//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2022 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

import Foundation
import SotoCore

extension Firehose {
    // MARK: Enums

    public enum AmazonOpenSearchServerlessS3BackupMode: String, CustomStringConvertible, Codable, _SotoSendable {
        case allDocuments = "AllDocuments"
        case failedDocumentsOnly = "FailedDocumentsOnly"
        public var description: String { return self.rawValue }
    }

    public enum AmazonopensearchserviceIndexRotationPeriod: String, CustomStringConvertible, Codable, _SotoSendable {
        case noRotation = "NoRotation"
        case oneDay = "OneDay"
        case oneHour = "OneHour"
        case oneMonth = "OneMonth"
        case oneWeek = "OneWeek"
        public var description: String { return self.rawValue }
    }

    public enum AmazonopensearchserviceS3BackupMode: String, CustomStringConvertible, Codable, _SotoSendable {
        case allDocuments = "AllDocuments"
        case failedDocumentsOnly = "FailedDocumentsOnly"
        public var description: String { return self.rawValue }
    }

    public enum CompressionFormat: String, CustomStringConvertible, Codable, _SotoSendable {
        case gzip = "GZIP"
        case hadoopSnappy = "HADOOP_SNAPPY"
        case snappy = "Snappy"
        case uncompressed = "UNCOMPRESSED"
        case zip = "ZIP"
        public var description: String { return self.rawValue }
    }

    public enum ContentEncoding: String, CustomStringConvertible, Codable, _SotoSendable {
        case gzip = "GZIP"
        case none = "NONE"
        public var description: String { return self.rawValue }
    }

    public enum DeliveryStreamEncryptionStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case disabled = "DISABLED"
        case disabling = "DISABLING"
        case disablingFailed = "DISABLING_FAILED"
        case enabled = "ENABLED"
        case enabling = "ENABLING"
        case enablingFailed = "ENABLING_FAILED"
        public var description: String { return self.rawValue }
    }

    public enum DeliveryStreamFailureType: String, CustomStringConvertible, Codable, _SotoSendable {
        case createEniFailed = "CREATE_ENI_FAILED"
        case createKmsGrantFailed = "CREATE_KMS_GRANT_FAILED"
        case deleteEniFailed = "DELETE_ENI_FAILED"
        case disabledKmsKey = "DISABLED_KMS_KEY"
        case eniAccessDenied = "ENI_ACCESS_DENIED"
        case invalidKmsKey = "INVALID_KMS_KEY"
        case kmsAccessDenied = "KMS_ACCESS_DENIED"
        case kmsKeyNotFound = "KMS_KEY_NOT_FOUND"
        case kmsOptInRequired = "KMS_OPT_IN_REQUIRED"
        case retireKmsGrantFailed = "RETIRE_KMS_GRANT_FAILED"
        case securityGroupAccessDenied = "SECURITY_GROUP_ACCESS_DENIED"
        case securityGroupNotFound = "SECURITY_GROUP_NOT_FOUND"
        case subnetAccessDenied = "SUBNET_ACCESS_DENIED"
        case subnetNotFound = "SUBNET_NOT_FOUND"
        case unknownError = "UNKNOWN_ERROR"
        public var description: String { return self.rawValue }
    }

    public enum DeliveryStreamStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case active = "ACTIVE"
        case creating = "CREATING"
        case creatingFailed = "CREATING_FAILED"
        case deleting = "DELETING"
        case deletingFailed = "DELETING_FAILED"
        public var description: String { return self.rawValue }
    }

    public enum DeliveryStreamType: String, CustomStringConvertible, Codable, _SotoSendable {
        case directPut = "DirectPut"
        case kinesisStreamAsSource = "KinesisStreamAsSource"
        public var description: String { return self.rawValue }
    }

    public enum ElasticsearchIndexRotationPeriod: String, CustomStringConvertible, Codable, _SotoSendable {
        case noRotation = "NoRotation"
        case oneDay = "OneDay"
        case oneHour = "OneHour"
        case oneMonth = "OneMonth"
        case oneWeek = "OneWeek"
        public var description: String { return self.rawValue }
    }

    public enum ElasticsearchS3BackupMode: String, CustomStringConvertible, Codable, _SotoSendable {
        case allDocuments = "AllDocuments"
        case failedDocumentsOnly = "FailedDocumentsOnly"
        public var description: String { return self.rawValue }
    }

    public enum HECEndpointType: String, CustomStringConvertible, Codable, _SotoSendable {
        case event = "Event"
        case raw = "Raw"
        public var description: String { return self.rawValue }
    }

    public enum HttpEndpointS3BackupMode: String, CustomStringConvertible, Codable, _SotoSendable {
        case allData = "AllData"
        case failedDataOnly = "FailedDataOnly"
        public var description: String { return self.rawValue }
    }

    public enum KeyType: String, CustomStringConvertible, Codable, _SotoSendable {
        case awsOwnedCmk = "AWS_OWNED_CMK"
        case customerManagedCmk = "CUSTOMER_MANAGED_CMK"
        public var description: String { return self.rawValue }
    }

    public enum NoEncryptionConfig: String, CustomStringConvertible, Codable, _SotoSendable {
        case noEncryption = "NoEncryption"
        public var description: String { return self.rawValue }
    }

    public enum OrcCompression: String, CustomStringConvertible, Codable, _SotoSendable {
        case none = "NONE"
        case snappy = "SNAPPY"
        case zlib = "ZLIB"
        public var description: String { return self.rawValue }
    }

    public enum OrcFormatVersion: String, CustomStringConvertible, Codable, _SotoSendable {
        case v011 = "V0_11"
        case v012 = "V0_12"
        public var description: String { return self.rawValue }
    }

    public enum ParquetCompression: String, CustomStringConvertible, Codable, _SotoSendable {
        case gzip = "GZIP"
        case snappy = "SNAPPY"
        case uncompressed = "UNCOMPRESSED"
        public var description: String { return self.rawValue }
    }

    public enum ParquetWriterVersion: String, CustomStringConvertible, Codable, _SotoSendable {
        case v1 = "V1"
        case v2 = "V2"
        public var description: String { return self.rawValue }
    }

    public enum ProcessorParameterName: String, CustomStringConvertible, Codable, _SotoSendable {
        case bufferIntervalInSeconds = "BufferIntervalInSeconds"
        case bufferSizeInMb = "BufferSizeInMBs"
        case delimiter = "Delimiter"
        case jsonParsingEngine = "JsonParsingEngine"
        case lambdaArn = "LambdaArn"
        case lambdaNumberOfRetries = "NumberOfRetries"
        case metadataExtractionQuery = "MetadataExtractionQuery"
        case roleArn = "RoleArn"
        case subRecordType = "SubRecordType"
        public var description: String { return self.rawValue }
    }

    public enum ProcessorType: String, CustomStringConvertible, Codable, _SotoSendable {
        case appendDelimiterToRecord = "AppendDelimiterToRecord"
        case lambda = "Lambda"
        case metadataExtraction = "MetadataExtraction"
        case recordDeAggregation = "RecordDeAggregation"
        public var description: String { return self.rawValue }
    }

    public enum RedshiftS3BackupMode: String, CustomStringConvertible, Codable, _SotoSendable {
        case disabled = "Disabled"
        case enabled = "Enabled"
        public var description: String { return self.rawValue }
    }

    public enum S3BackupMode: String, CustomStringConvertible, Codable, _SotoSendable {
        case disabled = "Disabled"
        case enabled = "Enabled"
        public var description: String { return self.rawValue }
    }

    public enum SplunkS3BackupMode: String, CustomStringConvertible, Codable, _SotoSendable {
        case allEvents = "AllEvents"
        case failedEventsOnly = "FailedEventsOnly"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AmazonOpenSearchServerlessBufferingHints: AWSEncodableShape & AWSDecodableShape {
        /// Buffer incoming data for the specified period of time, in seconds, before delivering it to the destination. The default value is 300 (5 minutes).
        public let intervalInSeconds: Int?
        /// Buffer incoming data to the specified size, in MBs, before delivering it to the destination. The default value is 5.  We recommend setting this parameter to a value greater than the amount of data you typically ingest into the delivery stream in 10 seconds. For example, if you typically ingest data at 1 MB/sec, the value should be 10 MB or higher.
        public let sizeInMBs: Int?

        public init(intervalInSeconds: Int? = nil, sizeInMBs: Int? = nil) {
            self.intervalInSeconds = intervalInSeconds
            self.sizeInMBs = sizeInMBs
        }

        public func validate(name: String) throws {
            try self.validate(self.intervalInSeconds, name: "intervalInSeconds", parent: name, max: 900)
            try self.validate(self.intervalInSeconds, name: "intervalInSeconds", parent: name, min: 60)
            try self.validate(self.sizeInMBs, name: "sizeInMBs", parent: name, max: 100)
            try self.validate(self.sizeInMBs, name: "sizeInMBs", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case intervalInSeconds = "IntervalInSeconds"
            case sizeInMBs = "SizeInMBs"
        }
    }

    public struct AmazonOpenSearchServerlessDestinationConfiguration: AWSEncodableShape {
        /// The buffering options. If no value is specified, the default values for AmazonopensearchserviceBufferingHints are used.
        public let bufferingHints: AmazonOpenSearchServerlessBufferingHints?
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// The endpoint to use when communicating with the collection in the Serverless offering for Amazon OpenSearch Service.
        public let collectionEndpoint: String?
        /// The Serverless offering for Amazon OpenSearch Service index name.
        public let indexName: String
        public let processingConfiguration: ProcessingConfiguration?
        /// The retry behavior in case Kinesis Data Firehose is unable to deliver documents to the Serverless offering for Amazon OpenSearch Service. The default value is 300 (5 minutes).
        public let retryOptions: AmazonOpenSearchServerlessRetryOptions?
        /// The Amazon Resource Name (ARN) of the IAM role to be assumed by Kinesis Data Firehose for calling the Serverless offering for Amazon OpenSearch Service Configuration API and for indexing documents.
        public let roleARN: String
        /// Defines how documents should be delivered to Amazon S3. When it is set to FailedDocumentsOnly, Kinesis Data Firehose writes any documents that could not be indexed to the configured Amazon S3 destination, with AmazonOpenSearchService-failed/ appended to the key prefix. When set to AllDocuments, Kinesis Data Firehose delivers all incoming records to Amazon S3, and also writes failed documents with AmazonOpenSearchService-failed/ appended to the prefix.
        public let s3BackupMode: AmazonOpenSearchServerlessS3BackupMode?
        public let s3Configuration: S3DestinationConfiguration
        public let vpcConfiguration: VpcConfiguration?

        public init(bufferingHints: AmazonOpenSearchServerlessBufferingHints? = nil, cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, collectionEndpoint: String? = nil, indexName: String, processingConfiguration: ProcessingConfiguration? = nil, retryOptions: AmazonOpenSearchServerlessRetryOptions? = nil, roleARN: String, s3BackupMode: AmazonOpenSearchServerlessS3BackupMode? = nil, s3Configuration: S3DestinationConfiguration, vpcConfiguration: VpcConfiguration? = nil) {
            self.bufferingHints = bufferingHints
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.collectionEndpoint = collectionEndpoint
            self.indexName = indexName
            self.processingConfiguration = processingConfiguration
            self.retryOptions = retryOptions
            self.roleARN = roleARN
            self.s3BackupMode = s3BackupMode
            self.s3Configuration = s3Configuration
            self.vpcConfiguration = vpcConfiguration
        }

        public func validate(name: String) throws {
            try self.bufferingHints?.validate(name: "\(name).bufferingHints")
            try self.cloudWatchLoggingOptions?.validate(name: "\(name).cloudWatchLoggingOptions")
            try self.validate(self.collectionEndpoint, name: "collectionEndpoint", parent: name, max: 512)
            try self.validate(self.collectionEndpoint, name: "collectionEndpoint", parent: name, min: 1)
            try self.validate(self.collectionEndpoint, name: "collectionEndpoint", parent: name, pattern: "^https:")
            try self.validate(self.indexName, name: "indexName", parent: name, max: 80)
            try self.validate(self.indexName, name: "indexName", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, pattern: ".*")
            try self.processingConfiguration?.validate(name: "\(name).processingConfiguration")
            try self.retryOptions?.validate(name: "\(name).retryOptions")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 512)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "^arn:")
            try self.s3Configuration.validate(name: "\(name).s3Configuration")
            try self.vpcConfiguration?.validate(name: "\(name).vpcConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case bufferingHints = "BufferingHints"
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case collectionEndpoint = "CollectionEndpoint"
            case indexName = "IndexName"
            case processingConfiguration = "ProcessingConfiguration"
            case retryOptions = "RetryOptions"
            case roleARN = "RoleARN"
            case s3BackupMode = "S3BackupMode"
            case s3Configuration = "S3Configuration"
            case vpcConfiguration = "VpcConfiguration"
        }
    }

    public struct AmazonOpenSearchServerlessDestinationDescription: AWSDecodableShape {
        /// The buffering options.
        public let bufferingHints: AmazonOpenSearchServerlessBufferingHints?
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// The endpoint to use when communicating with the collection in the Serverless offering for Amazon OpenSearch Service.
        public let collectionEndpoint: String?
        /// The Serverless offering for Amazon OpenSearch Service index name.
        public let indexName: String?
        public let processingConfiguration: ProcessingConfiguration?
        /// The Serverless offering for Amazon OpenSearch Service retry options.
        public let retryOptions: AmazonOpenSearchServerlessRetryOptions?
        /// The Amazon Resource Name (ARN) of the AWS credentials.
        public let roleARN: String?
        /// The Amazon S3 backup mode.
        public let s3BackupMode: AmazonOpenSearchServerlessS3BackupMode?
        public let s3DestinationDescription: S3DestinationDescription?
        public let vpcConfigurationDescription: VpcConfigurationDescription?

        public init(bufferingHints: AmazonOpenSearchServerlessBufferingHints? = nil, cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, collectionEndpoint: String? = nil, indexName: String? = nil, processingConfiguration: ProcessingConfiguration? = nil, retryOptions: AmazonOpenSearchServerlessRetryOptions? = nil, roleARN: String? = nil, s3BackupMode: AmazonOpenSearchServerlessS3BackupMode? = nil, s3DestinationDescription: S3DestinationDescription? = nil, vpcConfigurationDescription: VpcConfigurationDescription? = nil) {
            self.bufferingHints = bufferingHints
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.collectionEndpoint = collectionEndpoint
            self.indexName = indexName
            self.processingConfiguration = processingConfiguration
            self.retryOptions = retryOptions
            self.roleARN = roleARN
            self.s3BackupMode = s3BackupMode
            self.s3DestinationDescription = s3DestinationDescription
            self.vpcConfigurationDescription = vpcConfigurationDescription
        }

        private enum CodingKeys: String, CodingKey {
            case bufferingHints = "BufferingHints"
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case collectionEndpoint = "CollectionEndpoint"
            case indexName = "IndexName"
            case processingConfiguration = "ProcessingConfiguration"
            case retryOptions = "RetryOptions"
            case roleARN = "RoleARN"
            case s3BackupMode = "S3BackupMode"
            case s3DestinationDescription = "S3DestinationDescription"
            case vpcConfigurationDescription = "VpcConfigurationDescription"
        }
    }

    public struct AmazonOpenSearchServerlessDestinationUpdate: AWSEncodableShape {
        /// The buffering options. If no value is specified, AmazonopensearchBufferingHints object default values are used.
        public let bufferingHints: AmazonOpenSearchServerlessBufferingHints?
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// The endpoint to use when communicating with the collection in the Serverless offering for Amazon OpenSearch Service.
        public let collectionEndpoint: String?
        /// The Serverless offering for Amazon OpenSearch Service index name.
        public let indexName: String?
        public let processingConfiguration: ProcessingConfiguration?
        /// The retry behavior in case Kinesis Data Firehose is unable to deliver documents to the Serverless offering for Amazon OpenSearch Service. The default value is 300 (5 minutes).
        public let retryOptions: AmazonOpenSearchServerlessRetryOptions?
        /// The Amazon Resource Name (ARN) of the IAM role to be assumed by Kinesis Data Firehose for calling the Serverless offering for Amazon OpenSearch Service Configuration API and for indexing documents.
        public let roleARN: String?
        public let s3Update: S3DestinationUpdate?

        public init(bufferingHints: AmazonOpenSearchServerlessBufferingHints? = nil, cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, collectionEndpoint: String? = nil, indexName: String? = nil, processingConfiguration: ProcessingConfiguration? = nil, retryOptions: AmazonOpenSearchServerlessRetryOptions? = nil, roleARN: String? = nil, s3Update: S3DestinationUpdate? = nil) {
            self.bufferingHints = bufferingHints
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.collectionEndpoint = collectionEndpoint
            self.indexName = indexName
            self.processingConfiguration = processingConfiguration
            self.retryOptions = retryOptions
            self.roleARN = roleARN
            self.s3Update = s3Update
        }

        public func validate(name: String) throws {
            try self.bufferingHints?.validate(name: "\(name).bufferingHints")
            try self.cloudWatchLoggingOptions?.validate(name: "\(name).cloudWatchLoggingOptions")
            try self.validate(self.collectionEndpoint, name: "collectionEndpoint", parent: name, max: 512)
            try self.validate(self.collectionEndpoint, name: "collectionEndpoint", parent: name, min: 1)
            try self.validate(self.collectionEndpoint, name: "collectionEndpoint", parent: name, pattern: "^https:")
            try self.validate(self.indexName, name: "indexName", parent: name, max: 80)
            try self.validate(self.indexName, name: "indexName", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, pattern: ".*")
            try self.processingConfiguration?.validate(name: "\(name).processingConfiguration")
            try self.retryOptions?.validate(name: "\(name).retryOptions")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 512)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "^arn:")
            try self.s3Update?.validate(name: "\(name).s3Update")
        }

        private enum CodingKeys: String, CodingKey {
            case bufferingHints = "BufferingHints"
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case collectionEndpoint = "CollectionEndpoint"
            case indexName = "IndexName"
            case processingConfiguration = "ProcessingConfiguration"
            case retryOptions = "RetryOptions"
            case roleARN = "RoleARN"
            case s3Update = "S3Update"
        }
    }

    public struct AmazonOpenSearchServerlessRetryOptions: AWSEncodableShape & AWSDecodableShape {
        /// After an initial failure to deliver to the Serverless offering for Amazon OpenSearch Service, the total amount of time during which Kinesis Data Firehose retries delivery (including the first attempt). After this time has elapsed, the failed documents are written to Amazon S3. Default value is 300 seconds (5 minutes). A value of 0 (zero) results in no retries.
        public let durationInSeconds: Int?

        public init(durationInSeconds: Int? = nil) {
            self.durationInSeconds = durationInSeconds
        }

        public func validate(name: String) throws {
            try self.validate(self.durationInSeconds, name: "durationInSeconds", parent: name, max: 7200)
            try self.validate(self.durationInSeconds, name: "durationInSeconds", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case durationInSeconds = "DurationInSeconds"
        }
    }

    public struct AmazonopensearchserviceBufferingHints: AWSEncodableShape & AWSDecodableShape {
        /// Buffer incoming data for the specified period of time, in seconds, before delivering it to the destination. The default value is 300 (5 minutes).
        public let intervalInSeconds: Int?
        /// Buffer incoming data to the specified size, in MBs, before delivering it to the destination. The default value is 5. We recommend setting this parameter to a value greater than the amount of data you typically ingest into the delivery stream in 10 seconds. For example, if you typically ingest data at 1 MB/sec, the value should be 10 MB or higher.
        public let sizeInMBs: Int?

        public init(intervalInSeconds: Int? = nil, sizeInMBs: Int? = nil) {
            self.intervalInSeconds = intervalInSeconds
            self.sizeInMBs = sizeInMBs
        }

        public func validate(name: String) throws {
            try self.validate(self.intervalInSeconds, name: "intervalInSeconds", parent: name, max: 900)
            try self.validate(self.intervalInSeconds, name: "intervalInSeconds", parent: name, min: 60)
            try self.validate(self.sizeInMBs, name: "sizeInMBs", parent: name, max: 100)
            try self.validate(self.sizeInMBs, name: "sizeInMBs", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case intervalInSeconds = "IntervalInSeconds"
            case sizeInMBs = "SizeInMBs"
        }
    }

    public struct AmazonopensearchserviceDestinationConfiguration: AWSEncodableShape {
        /// The buffering options. If no value is specified, the default values for AmazonopensearchserviceBufferingHints are used.
        public let bufferingHints: AmazonopensearchserviceBufferingHints?
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// The endpoint to use when communicating with the cluster. Specify either this ClusterEndpoint or the DomainARN field.
        public let clusterEndpoint: String?
        /// The ARN of the Amazon OpenSearch Service domain. The IAM role must have permissions for DescribeElasticsearchDomain, DescribeElasticsearchDomains, and DescribeElasticsearchDomainConfig after assuming the role specified in RoleARN.
        public let domainARN: String?
        /// The ElasticsearAmazon OpenSearch Service index name.
        public let indexName: String
        /// The Amazon OpenSearch Service index rotation period. Index rotation appends a timestamp to the IndexName to facilitate the expiration of old data.
        public let indexRotationPeriod: AmazonopensearchserviceIndexRotationPeriod?
        public let processingConfiguration: ProcessingConfiguration?
        /// The retry behavior in case Kinesis Data Firehose is unable to deliver documents to Amazon OpenSearch Service. The default value is 300 (5 minutes).
        public let retryOptions: AmazonopensearchserviceRetryOptions?
        /// The Amazon Resource Name (ARN) of the IAM role to be assumed by Kinesis Data Firehose for calling the Amazon OpenSearch Service Configuration API and for indexing documents.
        public let roleARN: String
        /// Defines how documents should be delivered to Amazon S3. When it is set to FailedDocumentsOnly, Kinesis Data Firehose writes any documents that could not be indexed to the configured Amazon S3 destination, with AmazonOpenSearchService-failed/ appended to the key prefix. When set to AllDocuments, Kinesis Data Firehose delivers all incoming records to Amazon S3, and also writes failed documents with AmazonOpenSearchService-failed/ appended to the prefix.
        public let s3BackupMode: AmazonopensearchserviceS3BackupMode?
        public let s3Configuration: S3DestinationConfiguration
        /// The Amazon OpenSearch Service type name. For Elasticsearch 6.x, there can be only one type per index. If you try to specify a new type for an existing index that already has another type, Kinesis Data Firehose returns an error during run time.
        public let typeName: String?
        public let vpcConfiguration: VpcConfiguration?

        public init(bufferingHints: AmazonopensearchserviceBufferingHints? = nil, cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, clusterEndpoint: String? = nil, domainARN: String? = nil, indexName: String, indexRotationPeriod: AmazonopensearchserviceIndexRotationPeriod? = nil, processingConfiguration: ProcessingConfiguration? = nil, retryOptions: AmazonopensearchserviceRetryOptions? = nil, roleARN: String, s3BackupMode: AmazonopensearchserviceS3BackupMode? = nil, s3Configuration: S3DestinationConfiguration, typeName: String? = nil, vpcConfiguration: VpcConfiguration? = nil) {
            self.bufferingHints = bufferingHints
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.clusterEndpoint = clusterEndpoint
            self.domainARN = domainARN
            self.indexName = indexName
            self.indexRotationPeriod = indexRotationPeriod
            self.processingConfiguration = processingConfiguration
            self.retryOptions = retryOptions
            self.roleARN = roleARN
            self.s3BackupMode = s3BackupMode
            self.s3Configuration = s3Configuration
            self.typeName = typeName
            self.vpcConfiguration = vpcConfiguration
        }

        public func validate(name: String) throws {
            try self.bufferingHints?.validate(name: "\(name).bufferingHints")
            try self.cloudWatchLoggingOptions?.validate(name: "\(name).cloudWatchLoggingOptions")
            try self.validate(self.clusterEndpoint, name: "clusterEndpoint", parent: name, max: 512)
            try self.validate(self.clusterEndpoint, name: "clusterEndpoint", parent: name, min: 1)
            try self.validate(self.clusterEndpoint, name: "clusterEndpoint", parent: name, pattern: "^https:")
            try self.validate(self.domainARN, name: "domainARN", parent: name, max: 512)
            try self.validate(self.domainARN, name: "domainARN", parent: name, min: 1)
            try self.validate(self.domainARN, name: "domainARN", parent: name, pattern: "^arn:")
            try self.validate(self.indexName, name: "indexName", parent: name, max: 80)
            try self.validate(self.indexName, name: "indexName", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, pattern: ".*")
            try self.processingConfiguration?.validate(name: "\(name).processingConfiguration")
            try self.retryOptions?.validate(name: "\(name).retryOptions")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 512)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "^arn:")
            try self.s3Configuration.validate(name: "\(name).s3Configuration")
            try self.validate(self.typeName, name: "typeName", parent: name, max: 100)
            try self.validate(self.typeName, name: "typeName", parent: name, pattern: ".*")
            try self.vpcConfiguration?.validate(name: "\(name).vpcConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case bufferingHints = "BufferingHints"
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case clusterEndpoint = "ClusterEndpoint"
            case domainARN = "DomainARN"
            case indexName = "IndexName"
            case indexRotationPeriod = "IndexRotationPeriod"
            case processingConfiguration = "ProcessingConfiguration"
            case retryOptions = "RetryOptions"
            case roleARN = "RoleARN"
            case s3BackupMode = "S3BackupMode"
            case s3Configuration = "S3Configuration"
            case typeName = "TypeName"
            case vpcConfiguration = "VpcConfiguration"
        }
    }

    public struct AmazonopensearchserviceDestinationDescription: AWSDecodableShape {
        /// The buffering options.
        public let bufferingHints: AmazonopensearchserviceBufferingHints?
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// The endpoint to use when communicating with the cluster. Kinesis Data Firehose uses either this ClusterEndpoint or the DomainARN field to send data to Amazon OpenSearch Service.
        public let clusterEndpoint: String?
        /// The ARN of the Amazon OpenSearch Service domain.
        public let domainARN: String?
        /// The Amazon OpenSearch Service index name.
        public let indexName: String?
        /// The Amazon OpenSearch Service index rotation period
        public let indexRotationPeriod: AmazonopensearchserviceIndexRotationPeriod?
        public let processingConfiguration: ProcessingConfiguration?
        /// The Amazon OpenSearch Service retry options.
        public let retryOptions: AmazonopensearchserviceRetryOptions?
        /// The Amazon Resource Name (ARN) of the Amazon Web Services credentials.
        public let roleARN: String?
        /// The Amazon S3 backup mode.
        public let s3BackupMode: AmazonopensearchserviceS3BackupMode?
        public let s3DestinationDescription: S3DestinationDescription?
        /// The Amazon OpenSearch Service type name. This applies to Elasticsearch 6.x and lower versions. For Elasticsearch 7.x and OpenSearch Service 1.x, there's no value for TypeName.
        public let typeName: String?
        public let vpcConfigurationDescription: VpcConfigurationDescription?

        public init(bufferingHints: AmazonopensearchserviceBufferingHints? = nil, cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, clusterEndpoint: String? = nil, domainARN: String? = nil, indexName: String? = nil, indexRotationPeriod: AmazonopensearchserviceIndexRotationPeriod? = nil, processingConfiguration: ProcessingConfiguration? = nil, retryOptions: AmazonopensearchserviceRetryOptions? = nil, roleARN: String? = nil, s3BackupMode: AmazonopensearchserviceS3BackupMode? = nil, s3DestinationDescription: S3DestinationDescription? = nil, typeName: String? = nil, vpcConfigurationDescription: VpcConfigurationDescription? = nil) {
            self.bufferingHints = bufferingHints
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.clusterEndpoint = clusterEndpoint
            self.domainARN = domainARN
            self.indexName = indexName
            self.indexRotationPeriod = indexRotationPeriod
            self.processingConfiguration = processingConfiguration
            self.retryOptions = retryOptions
            self.roleARN = roleARN
            self.s3BackupMode = s3BackupMode
            self.s3DestinationDescription = s3DestinationDescription
            self.typeName = typeName
            self.vpcConfigurationDescription = vpcConfigurationDescription
        }

        private enum CodingKeys: String, CodingKey {
            case bufferingHints = "BufferingHints"
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case clusterEndpoint = "ClusterEndpoint"
            case domainARN = "DomainARN"
            case indexName = "IndexName"
            case indexRotationPeriod = "IndexRotationPeriod"
            case processingConfiguration = "ProcessingConfiguration"
            case retryOptions = "RetryOptions"
            case roleARN = "RoleARN"
            case s3BackupMode = "S3BackupMode"
            case s3DestinationDescription = "S3DestinationDescription"
            case typeName = "TypeName"
            case vpcConfigurationDescription = "VpcConfigurationDescription"
        }
    }

    public struct AmazonopensearchserviceDestinationUpdate: AWSEncodableShape {
        /// The buffering options. If no value is specified, AmazonopensearchBufferingHints object default values are used.
        public let bufferingHints: AmazonopensearchserviceBufferingHints?
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// The endpoint to use when communicating with the cluster. Specify either this ClusterEndpoint or the DomainARN field.
        public let clusterEndpoint: String?
        /// The ARN of the Amazon OpenSearch Service domain. The IAM role must have permissions for DescribeDomain, DescribeDomains, and DescribeDomainConfig after assuming the IAM role specified in RoleARN.
        public let domainARN: String?
        /// The Amazon OpenSearch Service index name.
        public let indexName: String?
        /// The Amazon OpenSearch Service index rotation period. Index rotation appends a timestamp to IndexName to facilitate the expiration of old data.
        public let indexRotationPeriod: AmazonopensearchserviceIndexRotationPeriod?
        public let processingConfiguration: ProcessingConfiguration?
        /// The retry behavior in case Kinesis Data Firehose is unable to deliver documents to Amazon OpenSearch Service. The default value is 300 (5 minutes).
        public let retryOptions: AmazonopensearchserviceRetryOptions?
        /// The Amazon Resource Name (ARN) of the IAM role to be assumed by Kinesis Data Firehose for calling the Amazon OpenSearch Service Configuration API and for indexing documents.
        public let roleARN: String?
        public let s3Update: S3DestinationUpdate?
        /// The Amazon OpenSearch Service type name. For Elasticsearch 6.x, there can be only one type per index. If you try to specify a new type for an existing index that already has another type, Kinesis Data Firehose returns an error during runtime.  If you upgrade Elasticsearch from 6.x to 7.x and don’t update your delivery stream, Kinesis Data Firehose still delivers data to Elasticsearch with the old index name and type name. If you want to update your delivery stream with a new index name, provide an empty string for TypeName.
        public let typeName: String?

        public init(bufferingHints: AmazonopensearchserviceBufferingHints? = nil, cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, clusterEndpoint: String? = nil, domainARN: String? = nil, indexName: String? = nil, indexRotationPeriod: AmazonopensearchserviceIndexRotationPeriod? = nil, processingConfiguration: ProcessingConfiguration? = nil, retryOptions: AmazonopensearchserviceRetryOptions? = nil, roleARN: String? = nil, s3Update: S3DestinationUpdate? = nil, typeName: String? = nil) {
            self.bufferingHints = bufferingHints
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.clusterEndpoint = clusterEndpoint
            self.domainARN = domainARN
            self.indexName = indexName
            self.indexRotationPeriod = indexRotationPeriod
            self.processingConfiguration = processingConfiguration
            self.retryOptions = retryOptions
            self.roleARN = roleARN
            self.s3Update = s3Update
            self.typeName = typeName
        }

        public func validate(name: String) throws {
            try self.bufferingHints?.validate(name: "\(name).bufferingHints")
            try self.cloudWatchLoggingOptions?.validate(name: "\(name).cloudWatchLoggingOptions")
            try self.validate(self.clusterEndpoint, name: "clusterEndpoint", parent: name, max: 512)
            try self.validate(self.clusterEndpoint, name: "clusterEndpoint", parent: name, min: 1)
            try self.validate(self.clusterEndpoint, name: "clusterEndpoint", parent: name, pattern: "^https:")
            try self.validate(self.domainARN, name: "domainARN", parent: name, max: 512)
            try self.validate(self.domainARN, name: "domainARN", parent: name, min: 1)
            try self.validate(self.domainARN, name: "domainARN", parent: name, pattern: "^arn:")
            try self.validate(self.indexName, name: "indexName", parent: name, max: 80)
            try self.validate(self.indexName, name: "indexName", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, pattern: ".*")
            try self.processingConfiguration?.validate(name: "\(name).processingConfiguration")
            try self.retryOptions?.validate(name: "\(name).retryOptions")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 512)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "^arn:")
            try self.s3Update?.validate(name: "\(name).s3Update")
            try self.validate(self.typeName, name: "typeName", parent: name, max: 100)
            try self.validate(self.typeName, name: "typeName", parent: name, pattern: ".*")
        }

        private enum CodingKeys: String, CodingKey {
            case bufferingHints = "BufferingHints"
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case clusterEndpoint = "ClusterEndpoint"
            case domainARN = "DomainARN"
            case indexName = "IndexName"
            case indexRotationPeriod = "IndexRotationPeriod"
            case processingConfiguration = "ProcessingConfiguration"
            case retryOptions = "RetryOptions"
            case roleARN = "RoleARN"
            case s3Update = "S3Update"
            case typeName = "TypeName"
        }
    }

    public struct AmazonopensearchserviceRetryOptions: AWSEncodableShape & AWSDecodableShape {
        /// After an initial failure to deliver to Amazon OpenSearch Service, the total amount of time during which Kinesis Data Firehose retries delivery (including the first attempt). After this time has elapsed, the failed documents are written to Amazon S3. Default value is 300 seconds (5 minutes). A value of 0 (zero) results in no retries.
        public let durationInSeconds: Int?

        public init(durationInSeconds: Int? = nil) {
            self.durationInSeconds = durationInSeconds
        }

        public func validate(name: String) throws {
            try self.validate(self.durationInSeconds, name: "durationInSeconds", parent: name, max: 7200)
            try self.validate(self.durationInSeconds, name: "durationInSeconds", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case durationInSeconds = "DurationInSeconds"
        }
    }

    public struct BufferingHints: AWSEncodableShape & AWSDecodableShape {
        /// Buffer incoming data for the specified period of time, in seconds, before delivering it to the destination. The default value is 300. This parameter is optional but if you specify a value for it, you must also specify a value for SizeInMBs, and vice versa.
        public let intervalInSeconds: Int?
        /// Buffer incoming data to the specified size, in MiBs, before delivering it to the destination. The default value is 5. This parameter is optional but if you specify a value for it, you must also specify a value for IntervalInSeconds, and vice versa. We recommend setting this parameter to a value greater than the amount of data you typically ingest into the delivery stream in 10 seconds. For example, if you typically ingest data at 1 MiB/sec, the value should be 10 MiB or higher.
        public let sizeInMBs: Int?

        public init(intervalInSeconds: Int? = nil, sizeInMBs: Int? = nil) {
            self.intervalInSeconds = intervalInSeconds
            self.sizeInMBs = sizeInMBs
        }

        public func validate(name: String) throws {
            try self.validate(self.intervalInSeconds, name: "intervalInSeconds", parent: name, max: 900)
            try self.validate(self.intervalInSeconds, name: "intervalInSeconds", parent: name, min: 60)
            try self.validate(self.sizeInMBs, name: "sizeInMBs", parent: name, max: 128)
            try self.validate(self.sizeInMBs, name: "sizeInMBs", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case intervalInSeconds = "IntervalInSeconds"
            case sizeInMBs = "SizeInMBs"
        }
    }

    public struct CloudWatchLoggingOptions: AWSEncodableShape & AWSDecodableShape {
        /// Enables or disables CloudWatch logging.
        public let enabled: Bool?
        /// The CloudWatch group name for logging. This value is required if CloudWatch logging is enabled.
        public let logGroupName: String?
        /// The CloudWatch log stream name for logging. This value is required if CloudWatch logging is enabled.
        public let logStreamName: String?

        public init(enabled: Bool? = nil, logGroupName: String? = nil, logStreamName: String? = nil) {
            self.enabled = enabled
            self.logGroupName = logGroupName
            self.logStreamName = logStreamName
        }

        public func validate(name: String) throws {
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, max: 512)
            try self.validate(self.logGroupName, name: "logGroupName", parent: name, pattern: "^[\\.\\-_/#A-Za-z0-9]*$")
            try self.validate(self.logStreamName, name: "logStreamName", parent: name, max: 512)
            try self.validate(self.logStreamName, name: "logStreamName", parent: name, pattern: "^[^:*]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
            case logGroupName = "LogGroupName"
            case logStreamName = "LogStreamName"
        }
    }

    public struct CopyCommand: AWSEncodableShape & AWSDecodableShape {
        /// Optional parameters to use with the Amazon Redshift COPY command. For more information, see the "Optional Parameters" section of Amazon Redshift COPY command. Some possible examples that would apply to Kinesis Data Firehose are as follows:  delimiter '\t' lzop; - fields are delimited with "\t" (TAB character) and compressed using lzop.  delimiter '|' - fields are delimited with "|" (this is the default delimiter).  delimiter '|' escape - the delimiter should be escaped.  fixedwidth 'venueid:3,venuename:25,venuecity:12,venuestate:2,venueseats:6' - fields are fixed width in the source, with each width specified after every column in the table.  JSON 's3://mybucket/jsonpaths.txt' - data is in JSON format, and the path specified is the format of the data. For more examples, see Amazon Redshift COPY command examples.
        public let copyOptions: String?
        /// A comma-separated list of column names.
        public let dataTableColumns: String?
        /// The name of the target table. The table must already exist in the database.
        public let dataTableName: String

        public init(copyOptions: String? = nil, dataTableColumns: String? = nil, dataTableName: String) {
            self.copyOptions = copyOptions
            self.dataTableColumns = dataTableColumns
            self.dataTableName = dataTableName
        }

        public func validate(name: String) throws {
            try self.validate(self.copyOptions, name: "copyOptions", parent: name, max: 204_800)
            try self.validate(self.copyOptions, name: "copyOptions", parent: name, pattern: ".*")
            try self.validate(self.dataTableColumns, name: "dataTableColumns", parent: name, max: 204_800)
            try self.validate(self.dataTableColumns, name: "dataTableColumns", parent: name, pattern: ".*")
            try self.validate(self.dataTableName, name: "dataTableName", parent: name, max: 512)
            try self.validate(self.dataTableName, name: "dataTableName", parent: name, min: 1)
            try self.validate(self.dataTableName, name: "dataTableName", parent: name, pattern: ".*")
        }

        private enum CodingKeys: String, CodingKey {
            case copyOptions = "CopyOptions"
            case dataTableColumns = "DataTableColumns"
            case dataTableName = "DataTableName"
        }
    }

    public struct CreateDeliveryStreamInput: AWSEncodableShape {
        /// The destination in the Serverless offering for Amazon OpenSearch Service. You can specify only one destination.
        public let amazonOpenSearchServerlessDestinationConfiguration: AmazonOpenSearchServerlessDestinationConfiguration?
        /// The destination in Amazon OpenSearch Service. You can specify only one destination.
        public let amazonopensearchserviceDestinationConfiguration: AmazonopensearchserviceDestinationConfiguration?
        /// Used to specify the type and Amazon Resource Name (ARN) of the KMS key needed for Server-Side Encryption (SSE).
        public let deliveryStreamEncryptionConfigurationInput: DeliveryStreamEncryptionConfigurationInput?
        /// The name of the delivery stream. This name must be unique per Amazon Web Services account in the same Amazon Web Services Region. If the delivery streams are in different accounts or different Regions, you can have multiple delivery streams with the same name.
        public let deliveryStreamName: String
        /// The delivery stream type. This parameter can be one of the following values:    DirectPut: Provider applications access the delivery stream directly.    KinesisStreamAsSource: The delivery stream uses a Kinesis data stream as a source.
        public let deliveryStreamType: DeliveryStreamType?
        /// The destination in Amazon ES. You can specify only one destination.
        public let elasticsearchDestinationConfiguration: ElasticsearchDestinationConfiguration?
        /// The destination in Amazon S3. You can specify only one destination.
        public let extendedS3DestinationConfiguration: ExtendedS3DestinationConfiguration?
        /// Enables configuring Kinesis Firehose to deliver data to any HTTP endpoint destination. You can specify only one destination.
        public let httpEndpointDestinationConfiguration: HttpEndpointDestinationConfiguration?
        /// When a Kinesis data stream is used as the source for the delivery stream, a KinesisStreamSourceConfiguration containing the Kinesis data stream Amazon Resource Name (ARN) and the role ARN for the source stream.
        public let kinesisStreamSourceConfiguration: KinesisStreamSourceConfiguration?
        /// The destination in Amazon Redshift. You can specify only one destination.
        public let redshiftDestinationConfiguration: RedshiftDestinationConfiguration?
        /// [Deprecated] The destination in Amazon S3. You can specify only one destination.
        public let s3DestinationConfiguration: S3DestinationConfiguration?
        /// The destination in Splunk. You can specify only one destination.
        public let splunkDestinationConfiguration: SplunkDestinationConfiguration?
        /// A set of tags to assign to the delivery stream. A tag is a key-value pair that you can define and assign to Amazon Web Services resources. Tags are metadata. For example, you can add friendly names and descriptions or other types of information that can help you distinguish the delivery stream. For more information about tags, see Using Cost Allocation Tags in the Amazon Web Services Billing and Cost Management User Guide.
        ///  You can specify up to 50 tags when creating a delivery stream.
        public let tags: [Tag]?

        public init(amazonOpenSearchServerlessDestinationConfiguration: AmazonOpenSearchServerlessDestinationConfiguration? = nil, amazonopensearchserviceDestinationConfiguration: AmazonopensearchserviceDestinationConfiguration? = nil, deliveryStreamEncryptionConfigurationInput: DeliveryStreamEncryptionConfigurationInput? = nil, deliveryStreamName: String, deliveryStreamType: DeliveryStreamType? = nil, elasticsearchDestinationConfiguration: ElasticsearchDestinationConfiguration? = nil, extendedS3DestinationConfiguration: ExtendedS3DestinationConfiguration? = nil, httpEndpointDestinationConfiguration: HttpEndpointDestinationConfiguration? = nil, kinesisStreamSourceConfiguration: KinesisStreamSourceConfiguration? = nil, redshiftDestinationConfiguration: RedshiftDestinationConfiguration? = nil, splunkDestinationConfiguration: SplunkDestinationConfiguration? = nil, tags: [Tag]? = nil) {
            self.amazonOpenSearchServerlessDestinationConfiguration = amazonOpenSearchServerlessDestinationConfiguration
            self.amazonopensearchserviceDestinationConfiguration = amazonopensearchserviceDestinationConfiguration
            self.deliveryStreamEncryptionConfigurationInput = deliveryStreamEncryptionConfigurationInput
            self.deliveryStreamName = deliveryStreamName
            self.deliveryStreamType = deliveryStreamType
            self.elasticsearchDestinationConfiguration = elasticsearchDestinationConfiguration
            self.extendedS3DestinationConfiguration = extendedS3DestinationConfiguration
            self.httpEndpointDestinationConfiguration = httpEndpointDestinationConfiguration
            self.kinesisStreamSourceConfiguration = kinesisStreamSourceConfiguration
            self.redshiftDestinationConfiguration = redshiftDestinationConfiguration
            self.s3DestinationConfiguration = nil
            self.splunkDestinationConfiguration = splunkDestinationConfiguration
            self.tags = tags
        }

        @available(*, deprecated, message: "Members s3DestinationConfiguration have been deprecated")
        public init(amazonOpenSearchServerlessDestinationConfiguration: AmazonOpenSearchServerlessDestinationConfiguration? = nil, amazonopensearchserviceDestinationConfiguration: AmazonopensearchserviceDestinationConfiguration? = nil, deliveryStreamEncryptionConfigurationInput: DeliveryStreamEncryptionConfigurationInput? = nil, deliveryStreamName: String, deliveryStreamType: DeliveryStreamType? = nil, elasticsearchDestinationConfiguration: ElasticsearchDestinationConfiguration? = nil, extendedS3DestinationConfiguration: ExtendedS3DestinationConfiguration? = nil, httpEndpointDestinationConfiguration: HttpEndpointDestinationConfiguration? = nil, kinesisStreamSourceConfiguration: KinesisStreamSourceConfiguration? = nil, redshiftDestinationConfiguration: RedshiftDestinationConfiguration? = nil, s3DestinationConfiguration: S3DestinationConfiguration? = nil, splunkDestinationConfiguration: SplunkDestinationConfiguration? = nil, tags: [Tag]? = nil) {
            self.amazonOpenSearchServerlessDestinationConfiguration = amazonOpenSearchServerlessDestinationConfiguration
            self.amazonopensearchserviceDestinationConfiguration = amazonopensearchserviceDestinationConfiguration
            self.deliveryStreamEncryptionConfigurationInput = deliveryStreamEncryptionConfigurationInput
            self.deliveryStreamName = deliveryStreamName
            self.deliveryStreamType = deliveryStreamType
            self.elasticsearchDestinationConfiguration = elasticsearchDestinationConfiguration
            self.extendedS3DestinationConfiguration = extendedS3DestinationConfiguration
            self.httpEndpointDestinationConfiguration = httpEndpointDestinationConfiguration
            self.kinesisStreamSourceConfiguration = kinesisStreamSourceConfiguration
            self.redshiftDestinationConfiguration = redshiftDestinationConfiguration
            self.s3DestinationConfiguration = s3DestinationConfiguration
            self.splunkDestinationConfiguration = splunkDestinationConfiguration
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.amazonOpenSearchServerlessDestinationConfiguration?.validate(name: "\(name).amazonOpenSearchServerlessDestinationConfiguration")
            try self.amazonopensearchserviceDestinationConfiguration?.validate(name: "\(name).amazonopensearchserviceDestinationConfiguration")
            try self.deliveryStreamEncryptionConfigurationInput?.validate(name: "\(name).deliveryStreamEncryptionConfigurationInput")
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, max: 64)
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, min: 1)
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, pattern: "^[a-zA-Z0-9_.-]+$")
            try self.elasticsearchDestinationConfiguration?.validate(name: "\(name).elasticsearchDestinationConfiguration")
            try self.extendedS3DestinationConfiguration?.validate(name: "\(name).extendedS3DestinationConfiguration")
            try self.httpEndpointDestinationConfiguration?.validate(name: "\(name).httpEndpointDestinationConfiguration")
            try self.kinesisStreamSourceConfiguration?.validate(name: "\(name).kinesisStreamSourceConfiguration")
            try self.redshiftDestinationConfiguration?.validate(name: "\(name).redshiftDestinationConfiguration")
            try self.s3DestinationConfiguration?.validate(name: "\(name).s3DestinationConfiguration")
            try self.splunkDestinationConfiguration?.validate(name: "\(name).splunkDestinationConfiguration")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case amazonOpenSearchServerlessDestinationConfiguration = "AmazonOpenSearchServerlessDestinationConfiguration"
            case amazonopensearchserviceDestinationConfiguration = "AmazonopensearchserviceDestinationConfiguration"
            case deliveryStreamEncryptionConfigurationInput = "DeliveryStreamEncryptionConfigurationInput"
            case deliveryStreamName = "DeliveryStreamName"
            case deliveryStreamType = "DeliveryStreamType"
            case elasticsearchDestinationConfiguration = "ElasticsearchDestinationConfiguration"
            case extendedS3DestinationConfiguration = "ExtendedS3DestinationConfiguration"
            case httpEndpointDestinationConfiguration = "HttpEndpointDestinationConfiguration"
            case kinesisStreamSourceConfiguration = "KinesisStreamSourceConfiguration"
            case redshiftDestinationConfiguration = "RedshiftDestinationConfiguration"
            case s3DestinationConfiguration = "S3DestinationConfiguration"
            case splunkDestinationConfiguration = "SplunkDestinationConfiguration"
            case tags = "Tags"
        }
    }

    public struct CreateDeliveryStreamOutput: AWSDecodableShape {
        /// The ARN of the delivery stream.
        public let deliveryStreamARN: String?

        public init(deliveryStreamARN: String? = nil) {
            self.deliveryStreamARN = deliveryStreamARN
        }

        private enum CodingKeys: String, CodingKey {
            case deliveryStreamARN = "DeliveryStreamARN"
        }
    }

    public struct DataFormatConversionConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Defaults to true. Set it to false if you want to disable format conversion while preserving the configuration details.
        public let enabled: Bool?
        /// Specifies the deserializer that you want Kinesis Data Firehose to use to convert the format of your data from JSON. This parameter is required if Enabled is set to true.
        public let inputFormatConfiguration: InputFormatConfiguration?
        /// Specifies the serializer that you want Kinesis Data Firehose to use to convert the format of your data to the Parquet or ORC format. This parameter is required if Enabled is set to true.
        public let outputFormatConfiguration: OutputFormatConfiguration?
        /// Specifies the Amazon Web Services Glue Data Catalog table that contains the column information. This parameter is required if Enabled is set to true.
        public let schemaConfiguration: SchemaConfiguration?

        public init(enabled: Bool? = nil, inputFormatConfiguration: InputFormatConfiguration? = nil, outputFormatConfiguration: OutputFormatConfiguration? = nil, schemaConfiguration: SchemaConfiguration? = nil) {
            self.enabled = enabled
            self.inputFormatConfiguration = inputFormatConfiguration
            self.outputFormatConfiguration = outputFormatConfiguration
            self.schemaConfiguration = schemaConfiguration
        }

        public func validate(name: String) throws {
            try self.inputFormatConfiguration?.validate(name: "\(name).inputFormatConfiguration")
            try self.outputFormatConfiguration?.validate(name: "\(name).outputFormatConfiguration")
            try self.schemaConfiguration?.validate(name: "\(name).schemaConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
            case inputFormatConfiguration = "InputFormatConfiguration"
            case outputFormatConfiguration = "OutputFormatConfiguration"
            case schemaConfiguration = "SchemaConfiguration"
        }
    }

    public struct DeleteDeliveryStreamInput: AWSEncodableShape {
        /// Set this to true if you want to delete the delivery stream even if Kinesis Data Firehose is unable to retire the grant for the CMK. Kinesis Data Firehose might be unable to retire the grant due to a customer error, such as when the CMK or the grant are in an invalid state. If you force deletion, you can then use the RevokeGrant operation to revoke the grant you gave to Kinesis Data Firehose. If a failure to retire the grant happens due to an Amazon Web Services KMS issue, Kinesis Data Firehose keeps retrying the delete operation. The default value is false.
        public let allowForceDelete: Bool?
        /// The name of the delivery stream.
        public let deliveryStreamName: String

        public init(allowForceDelete: Bool? = nil, deliveryStreamName: String) {
            self.allowForceDelete = allowForceDelete
            self.deliveryStreamName = deliveryStreamName
        }

        public func validate(name: String) throws {
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, max: 64)
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, min: 1)
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, pattern: "^[a-zA-Z0-9_.-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case allowForceDelete = "AllowForceDelete"
            case deliveryStreamName = "DeliveryStreamName"
        }
    }

    public struct DeleteDeliveryStreamOutput: AWSDecodableShape {
        public init() {}
    }

    public struct DeliveryStreamDescription: AWSDecodableShape {
        /// The date and time that the delivery stream was created.
        public let createTimestamp: Date?
        /// The Amazon Resource Name (ARN) of the delivery stream. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
        public let deliveryStreamARN: String
        /// Indicates the server-side encryption (SSE) status for the delivery stream.
        public let deliveryStreamEncryptionConfiguration: DeliveryStreamEncryptionConfiguration?
        /// The name of the delivery stream.
        public let deliveryStreamName: String
        /// The status of the delivery stream. If the status of a delivery stream is CREATING_FAILED, this status doesn't change, and you can't invoke CreateDeliveryStream again on it. However, you can invoke the DeleteDeliveryStream operation to delete it.
        public let deliveryStreamStatus: DeliveryStreamStatus
        /// The delivery stream type. This can be one of the following values:    DirectPut: Provider applications access the delivery stream directly.    KinesisStreamAsSource: The delivery stream uses a Kinesis data stream as a source.
        public let deliveryStreamType: DeliveryStreamType
        /// The destinations.
        public let destinations: [DestinationDescription]
        /// Provides details in case one of the following operations fails due to an error related to KMS: CreateDeliveryStream, DeleteDeliveryStream, StartDeliveryStreamEncryption, StopDeliveryStreamEncryption.
        public let failureDescription: FailureDescription?
        /// Indicates whether there are more destinations available to list.
        public let hasMoreDestinations: Bool
        /// The date and time that the delivery stream was last updated.
        public let lastUpdateTimestamp: Date?
        /// If the DeliveryStreamType parameter is KinesisStreamAsSource, a SourceDescription object describing the source Kinesis data stream.
        public let source: SourceDescription?
        /// Each time the destination is updated for a delivery stream, the version ID is changed, and the current version ID is required when updating the destination. This is so that the service knows it is applying the changes to the correct version of the delivery stream.
        public let versionId: String

        public init(createTimestamp: Date? = nil, deliveryStreamARN: String, deliveryStreamEncryptionConfiguration: DeliveryStreamEncryptionConfiguration? = nil, deliveryStreamName: String, deliveryStreamStatus: DeliveryStreamStatus, deliveryStreamType: DeliveryStreamType, destinations: [DestinationDescription], failureDescription: FailureDescription? = nil, hasMoreDestinations: Bool, lastUpdateTimestamp: Date? = nil, source: SourceDescription? = nil, versionId: String) {
            self.createTimestamp = createTimestamp
            self.deliveryStreamARN = deliveryStreamARN
            self.deliveryStreamEncryptionConfiguration = deliveryStreamEncryptionConfiguration
            self.deliveryStreamName = deliveryStreamName
            self.deliveryStreamStatus = deliveryStreamStatus
            self.deliveryStreamType = deliveryStreamType
            self.destinations = destinations
            self.failureDescription = failureDescription
            self.hasMoreDestinations = hasMoreDestinations
            self.lastUpdateTimestamp = lastUpdateTimestamp
            self.source = source
            self.versionId = versionId
        }

        private enum CodingKeys: String, CodingKey {
            case createTimestamp = "CreateTimestamp"
            case deliveryStreamARN = "DeliveryStreamARN"
            case deliveryStreamEncryptionConfiguration = "DeliveryStreamEncryptionConfiguration"
            case deliveryStreamName = "DeliveryStreamName"
            case deliveryStreamStatus = "DeliveryStreamStatus"
            case deliveryStreamType = "DeliveryStreamType"
            case destinations = "Destinations"
            case failureDescription = "FailureDescription"
            case hasMoreDestinations = "HasMoreDestinations"
            case lastUpdateTimestamp = "LastUpdateTimestamp"
            case source = "Source"
            case versionId = "VersionId"
        }
    }

    public struct DeliveryStreamEncryptionConfiguration: AWSDecodableShape {
        /// Provides details in case one of the following operations fails due to an error related to KMS: CreateDeliveryStream, DeleteDeliveryStream, StartDeliveryStreamEncryption, StopDeliveryStreamEncryption.
        public let failureDescription: FailureDescription?
        /// If KeyType is CUSTOMER_MANAGED_CMK, this field contains the ARN of the customer managed CMK. If KeyType is Amazon Web Services_OWNED_CMK, DeliveryStreamEncryptionConfiguration doesn't contain a value for KeyARN.
        public let keyARN: String?
        /// Indicates the type of customer master key (CMK) that is used for encryption. The default setting is Amazon Web Services_OWNED_CMK. For more information about CMKs, see Customer Master Keys (CMKs).
        public let keyType: KeyType?
        /// This is the server-side encryption (SSE) status for the delivery stream. For a full description of the different values of this status, see StartDeliveryStreamEncryption and StopDeliveryStreamEncryption. If this status is ENABLING_FAILED or DISABLING_FAILED, it is the status of the most recent attempt to enable or disable SSE, respectively.
        public let status: DeliveryStreamEncryptionStatus?

        public init(failureDescription: FailureDescription? = nil, keyARN: String? = nil, keyType: KeyType? = nil, status: DeliveryStreamEncryptionStatus? = nil) {
            self.failureDescription = failureDescription
            self.keyARN = keyARN
            self.keyType = keyType
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case failureDescription = "FailureDescription"
            case keyARN = "KeyARN"
            case keyType = "KeyType"
            case status = "Status"
        }
    }

    public struct DeliveryStreamEncryptionConfigurationInput: AWSEncodableShape {
        /// If you set KeyType to CUSTOMER_MANAGED_CMK, you must specify the Amazon Resource Name (ARN) of the CMK. If you set KeyType to Amazon Web Services_OWNED_CMK, Kinesis Data Firehose uses a service-account CMK.
        public let keyARN: String?
        /// Indicates the type of customer master key (CMK) to use for encryption. The default setting is Amazon Web Services_OWNED_CMK. For more information about CMKs, see Customer Master Keys (CMKs). When you invoke CreateDeliveryStream or StartDeliveryStreamEncryption with KeyType set to CUSTOMER_MANAGED_CMK, Kinesis Data Firehose invokes the Amazon KMS operation CreateGrant to create a grant that allows the Kinesis Data Firehose service to use the customer managed CMK to perform encryption and decryption. Kinesis Data Firehose manages that grant.  When you invoke StartDeliveryStreamEncryption to change the CMK for a delivery stream that is encrypted with a customer managed CMK, Kinesis Data Firehose schedules the grant it had on the old CMK for retirement. You can use a CMK of type CUSTOMER_MANAGED_CMK to encrypt up to 500 delivery streams. If a CreateDeliveryStream or StartDeliveryStreamEncryption operation exceeds this limit, Kinesis Data Firehose throws a LimitExceededException.   To encrypt your delivery stream, use symmetric CMKs. Kinesis Data Firehose doesn't support asymmetric CMKs. For information about symmetric and asymmetric CMKs, see About Symmetric and Asymmetric CMKs in the Amazon Web Services Key Management Service developer guide.
        public let keyType: KeyType

        public init(keyARN: String? = nil, keyType: KeyType) {
            self.keyARN = keyARN
            self.keyType = keyType
        }

        public func validate(name: String) throws {
            try self.validate(self.keyARN, name: "keyARN", parent: name, max: 512)
            try self.validate(self.keyARN, name: "keyARN", parent: name, min: 1)
            try self.validate(self.keyARN, name: "keyARN", parent: name, pattern: "^arn:")
        }

        private enum CodingKeys: String, CodingKey {
            case keyARN = "KeyARN"
            case keyType = "KeyType"
        }
    }

    public struct DescribeDeliveryStreamInput: AWSEncodableShape {
        /// The name of the delivery stream.
        public let deliveryStreamName: String
        /// The ID of the destination to start returning the destination information. Kinesis Data Firehose supports one destination per delivery stream.
        public let exclusiveStartDestinationId: String?
        /// The limit on the number of destinations to return. You can have one destination per delivery stream.
        public let limit: Int?

        public init(deliveryStreamName: String, exclusiveStartDestinationId: String? = nil, limit: Int? = nil) {
            self.deliveryStreamName = deliveryStreamName
            self.exclusiveStartDestinationId = exclusiveStartDestinationId
            self.limit = limit
        }

        public func validate(name: String) throws {
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, max: 64)
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, min: 1)
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, pattern: "^[a-zA-Z0-9_.-]+$")
            try self.validate(self.exclusiveStartDestinationId, name: "exclusiveStartDestinationId", parent: name, max: 100)
            try self.validate(self.exclusiveStartDestinationId, name: "exclusiveStartDestinationId", parent: name, min: 1)
            try self.validate(self.exclusiveStartDestinationId, name: "exclusiveStartDestinationId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.validate(self.limit, name: "limit", parent: name, max: 10000)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case deliveryStreamName = "DeliveryStreamName"
            case exclusiveStartDestinationId = "ExclusiveStartDestinationId"
            case limit = "Limit"
        }
    }

    public struct DescribeDeliveryStreamOutput: AWSDecodableShape {
        /// Information about the delivery stream.
        public let deliveryStreamDescription: DeliveryStreamDescription

        public init(deliveryStreamDescription: DeliveryStreamDescription) {
            self.deliveryStreamDescription = deliveryStreamDescription
        }

        private enum CodingKeys: String, CodingKey {
            case deliveryStreamDescription = "DeliveryStreamDescription"
        }
    }

    public struct Deserializer: AWSEncodableShape & AWSDecodableShape {
        /// The native Hive / HCatalog JsonSerDe. Used by Kinesis Data Firehose for deserializing data, which means converting it from the JSON format in preparation for serializing it to the Parquet or ORC format. This is one of two deserializers you can choose, depending on which one offers the functionality you need. The other option is the OpenX SerDe.
        public let hiveJsonSerDe: HiveJsonSerDe?
        /// The OpenX SerDe. Used by Kinesis Data Firehose for deserializing data, which means converting it from the JSON format in preparation for serializing it to the Parquet or ORC format. This is one of two deserializers you can choose, depending on which one offers the functionality you need. The other option is the native Hive / HCatalog JsonSerDe.
        public let openXJsonSerDe: OpenXJsonSerDe?

        public init(hiveJsonSerDe: HiveJsonSerDe? = nil, openXJsonSerDe: OpenXJsonSerDe? = nil) {
            self.hiveJsonSerDe = hiveJsonSerDe
            self.openXJsonSerDe = openXJsonSerDe
        }

        public func validate(name: String) throws {
            try self.hiveJsonSerDe?.validate(name: "\(name).hiveJsonSerDe")
            try self.openXJsonSerDe?.validate(name: "\(name).openXJsonSerDe")
        }

        private enum CodingKeys: String, CodingKey {
            case hiveJsonSerDe = "HiveJsonSerDe"
            case openXJsonSerDe = "OpenXJsonSerDe"
        }
    }

    public struct DestinationDescription: AWSDecodableShape {
        /// The destination in the Serverless offering for Amazon OpenSearch Service.
        public let amazonOpenSearchServerlessDestinationDescription: AmazonOpenSearchServerlessDestinationDescription?
        /// The destination in Amazon OpenSearch Service.
        public let amazonopensearchserviceDestinationDescription: AmazonopensearchserviceDestinationDescription?
        /// The ID of the destination.
        public let destinationId: String
        /// The destination in Amazon ES.
        public let elasticsearchDestinationDescription: ElasticsearchDestinationDescription?
        /// The destination in Amazon S3.
        public let extendedS3DestinationDescription: ExtendedS3DestinationDescription?
        /// Describes the specified HTTP endpoint destination.
        public let httpEndpointDestinationDescription: HttpEndpointDestinationDescription?
        /// The destination in Amazon Redshift.
        public let redshiftDestinationDescription: RedshiftDestinationDescription?
        /// [Deprecated] The destination in Amazon S3.
        public let s3DestinationDescription: S3DestinationDescription?
        /// The destination in Splunk.
        public let splunkDestinationDescription: SplunkDestinationDescription?

        public init(amazonOpenSearchServerlessDestinationDescription: AmazonOpenSearchServerlessDestinationDescription? = nil, amazonopensearchserviceDestinationDescription: AmazonopensearchserviceDestinationDescription? = nil, destinationId: String, elasticsearchDestinationDescription: ElasticsearchDestinationDescription? = nil, extendedS3DestinationDescription: ExtendedS3DestinationDescription? = nil, httpEndpointDestinationDescription: HttpEndpointDestinationDescription? = nil, redshiftDestinationDescription: RedshiftDestinationDescription? = nil, s3DestinationDescription: S3DestinationDescription? = nil, splunkDestinationDescription: SplunkDestinationDescription? = nil) {
            self.amazonOpenSearchServerlessDestinationDescription = amazonOpenSearchServerlessDestinationDescription
            self.amazonopensearchserviceDestinationDescription = amazonopensearchserviceDestinationDescription
            self.destinationId = destinationId
            self.elasticsearchDestinationDescription = elasticsearchDestinationDescription
            self.extendedS3DestinationDescription = extendedS3DestinationDescription
            self.httpEndpointDestinationDescription = httpEndpointDestinationDescription
            self.redshiftDestinationDescription = redshiftDestinationDescription
            self.s3DestinationDescription = s3DestinationDescription
            self.splunkDestinationDescription = splunkDestinationDescription
        }

        private enum CodingKeys: String, CodingKey {
            case amazonOpenSearchServerlessDestinationDescription = "AmazonOpenSearchServerlessDestinationDescription"
            case amazonopensearchserviceDestinationDescription = "AmazonopensearchserviceDestinationDescription"
            case destinationId = "DestinationId"
            case elasticsearchDestinationDescription = "ElasticsearchDestinationDescription"
            case extendedS3DestinationDescription = "ExtendedS3DestinationDescription"
            case httpEndpointDestinationDescription = "HttpEndpointDestinationDescription"
            case redshiftDestinationDescription = "RedshiftDestinationDescription"
            case s3DestinationDescription = "S3DestinationDescription"
            case splunkDestinationDescription = "SplunkDestinationDescription"
        }
    }

    public struct DynamicPartitioningConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Specifies that the dynamic partitioning is enabled for this Kinesis Data Firehose delivery stream.
        public let enabled: Bool?
        /// The retry behavior in case Kinesis Data Firehose is unable to deliver data to an Amazon S3 prefix.
        public let retryOptions: RetryOptions?

        public init(enabled: Bool? = nil, retryOptions: RetryOptions? = nil) {
            self.enabled = enabled
            self.retryOptions = retryOptions
        }

        public func validate(name: String) throws {
            try self.retryOptions?.validate(name: "\(name).retryOptions")
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
            case retryOptions = "RetryOptions"
        }
    }

    public struct ElasticsearchBufferingHints: AWSEncodableShape & AWSDecodableShape {
        /// Buffer incoming data for the specified period of time, in seconds, before delivering it to the destination. The default value is 300 (5 minutes).
        public let intervalInSeconds: Int?
        /// Buffer incoming data to the specified size, in MBs, before delivering it to the destination. The default value is 5. We recommend setting this parameter to a value greater than the amount of data you typically ingest into the delivery stream in 10 seconds. For example, if you typically ingest data at 1 MB/sec, the value should be 10 MB or higher.
        public let sizeInMBs: Int?

        public init(intervalInSeconds: Int? = nil, sizeInMBs: Int? = nil) {
            self.intervalInSeconds = intervalInSeconds
            self.sizeInMBs = sizeInMBs
        }

        public func validate(name: String) throws {
            try self.validate(self.intervalInSeconds, name: "intervalInSeconds", parent: name, max: 900)
            try self.validate(self.intervalInSeconds, name: "intervalInSeconds", parent: name, min: 60)
            try self.validate(self.sizeInMBs, name: "sizeInMBs", parent: name, max: 100)
            try self.validate(self.sizeInMBs, name: "sizeInMBs", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case intervalInSeconds = "IntervalInSeconds"
            case sizeInMBs = "SizeInMBs"
        }
    }

    public struct ElasticsearchDestinationConfiguration: AWSEncodableShape {
        /// The buffering options. If no value is specified, the default values for ElasticsearchBufferingHints are used.
        public let bufferingHints: ElasticsearchBufferingHints?
        /// The Amazon CloudWatch logging options for your delivery stream.
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// The endpoint to use when communicating with the cluster. Specify either this ClusterEndpoint or the DomainARN field.
        public let clusterEndpoint: String?
        /// The ARN of the Amazon ES domain. The IAM role must have permissions for DescribeDomain, DescribeDomains, and DescribeDomainConfig after assuming the role specified in RoleARN. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
        ///  Specify either ClusterEndpoint or DomainARN.
        public let domainARN: String?
        /// The Elasticsearch index name.
        public let indexName: String
        /// The Elasticsearch index rotation period. Index rotation appends a timestamp to the IndexName to facilitate the expiration of old data. For more information, see Index Rotation for the Amazon ES Destination. The default value is OneDay.
        public let indexRotationPeriod: ElasticsearchIndexRotationPeriod?
        /// The data processing configuration.
        public let processingConfiguration: ProcessingConfiguration?
        /// The retry behavior in case Kinesis Data Firehose is unable to deliver documents to Amazon ES. The default value is 300 (5 minutes).
        public let retryOptions: ElasticsearchRetryOptions?
        /// The Amazon Resource Name (ARN) of the IAM role to be assumed by Kinesis Data Firehose for calling the Amazon ES Configuration API and for indexing documents. For more information, see Grant Kinesis Data Firehose Access to an Amazon S3 Destination and Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
        public let roleARN: String
        /// Defines how documents should be delivered to Amazon S3. When it is set to FailedDocumentsOnly, Kinesis Data Firehose writes any documents that could not be indexed to the configured Amazon S3 destination, with AmazonOpenSearchService-failed/ appended to the key prefix. When set to AllDocuments, Kinesis Data Firehose delivers all incoming records to Amazon S3, and also writes failed documents with AmazonOpenSearchService-failed/ appended to the prefix. For more information, see Amazon S3 Backup for the Amazon ES Destination. Default value is FailedDocumentsOnly. You can't change this backup mode after you create the delivery stream.
        public let s3BackupMode: ElasticsearchS3BackupMode?
        /// The configuration for the backup Amazon S3 location.
        public let s3Configuration: S3DestinationConfiguration
        /// The Elasticsearch type name. For Elasticsearch 6.x, there can be only one type per index. If you try to specify a new type for an existing index that already has another type, Kinesis Data Firehose returns an error during run time.
        ///  For Elasticsearch 7.x, don't specify a TypeName.
        public let typeName: String?
        /// The details of the VPC of the Amazon ES destination.
        public let vpcConfiguration: VpcConfiguration?

        public init(bufferingHints: ElasticsearchBufferingHints? = nil, cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, clusterEndpoint: String? = nil, domainARN: String? = nil, indexName: String, indexRotationPeriod: ElasticsearchIndexRotationPeriod? = nil, processingConfiguration: ProcessingConfiguration? = nil, retryOptions: ElasticsearchRetryOptions? = nil, roleARN: String, s3BackupMode: ElasticsearchS3BackupMode? = nil, s3Configuration: S3DestinationConfiguration, typeName: String? = nil, vpcConfiguration: VpcConfiguration? = nil) {
            self.bufferingHints = bufferingHints
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.clusterEndpoint = clusterEndpoint
            self.domainARN = domainARN
            self.indexName = indexName
            self.indexRotationPeriod = indexRotationPeriod
            self.processingConfiguration = processingConfiguration
            self.retryOptions = retryOptions
            self.roleARN = roleARN
            self.s3BackupMode = s3BackupMode
            self.s3Configuration = s3Configuration
            self.typeName = typeName
            self.vpcConfiguration = vpcConfiguration
        }

        public func validate(name: String) throws {
            try self.bufferingHints?.validate(name: "\(name).bufferingHints")
            try self.cloudWatchLoggingOptions?.validate(name: "\(name).cloudWatchLoggingOptions")
            try self.validate(self.clusterEndpoint, name: "clusterEndpoint", parent: name, max: 512)
            try self.validate(self.clusterEndpoint, name: "clusterEndpoint", parent: name, min: 1)
            try self.validate(self.clusterEndpoint, name: "clusterEndpoint", parent: name, pattern: "^https:")
            try self.validate(self.domainARN, name: "domainARN", parent: name, max: 512)
            try self.validate(self.domainARN, name: "domainARN", parent: name, min: 1)
            try self.validate(self.domainARN, name: "domainARN", parent: name, pattern: "^arn:")
            try self.validate(self.indexName, name: "indexName", parent: name, max: 80)
            try self.validate(self.indexName, name: "indexName", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, pattern: ".*")
            try self.processingConfiguration?.validate(name: "\(name).processingConfiguration")
            try self.retryOptions?.validate(name: "\(name).retryOptions")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 512)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "^arn:")
            try self.s3Configuration.validate(name: "\(name).s3Configuration")
            try self.validate(self.typeName, name: "typeName", parent: name, max: 100)
            try self.validate(self.typeName, name: "typeName", parent: name, pattern: ".*")
            try self.vpcConfiguration?.validate(name: "\(name).vpcConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case bufferingHints = "BufferingHints"
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case clusterEndpoint = "ClusterEndpoint"
            case domainARN = "DomainARN"
            case indexName = "IndexName"
            case indexRotationPeriod = "IndexRotationPeriod"
            case processingConfiguration = "ProcessingConfiguration"
            case retryOptions = "RetryOptions"
            case roleARN = "RoleARN"
            case s3BackupMode = "S3BackupMode"
            case s3Configuration = "S3Configuration"
            case typeName = "TypeName"
            case vpcConfiguration = "VpcConfiguration"
        }
    }

    public struct ElasticsearchDestinationDescription: AWSDecodableShape {
        /// The buffering options.
        public let bufferingHints: ElasticsearchBufferingHints?
        /// The Amazon CloudWatch logging options.
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// The endpoint to use when communicating with the cluster. Kinesis Data Firehose uses either this ClusterEndpoint or the DomainARN field to send data to Amazon ES.
        public let clusterEndpoint: String?
        /// The ARN of the Amazon ES domain. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
        ///  Kinesis Data Firehose uses either ClusterEndpoint or DomainARN to send data to Amazon ES.
        public let domainARN: String?
        /// The Elasticsearch index name.
        public let indexName: String?
        /// The Elasticsearch index rotation period
        public let indexRotationPeriod: ElasticsearchIndexRotationPeriod?
        /// The data processing configuration.
        public let processingConfiguration: ProcessingConfiguration?
        /// The Amazon ES retry options.
        public let retryOptions: ElasticsearchRetryOptions?
        /// The Amazon Resource Name (ARN) of the Amazon Web Services credentials. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
        public let roleARN: String?
        /// The Amazon S3 backup mode.
        public let s3BackupMode: ElasticsearchS3BackupMode?
        /// The Amazon S3 destination.
        public let s3DestinationDescription: S3DestinationDescription?
        /// The Elasticsearch type name. This applies to Elasticsearch 6.x and lower versions. For Elasticsearch 7.x and OpenSearch Service 1.x, there's no value for TypeName.
        public let typeName: String?
        /// The details of the VPC of the Amazon ES destination.
        public let vpcConfigurationDescription: VpcConfigurationDescription?

        public init(bufferingHints: ElasticsearchBufferingHints? = nil, cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, clusterEndpoint: String? = nil, domainARN: String? = nil, indexName: String? = nil, indexRotationPeriod: ElasticsearchIndexRotationPeriod? = nil, processingConfiguration: ProcessingConfiguration? = nil, retryOptions: ElasticsearchRetryOptions? = nil, roleARN: String? = nil, s3BackupMode: ElasticsearchS3BackupMode? = nil, s3DestinationDescription: S3DestinationDescription? = nil, typeName: String? = nil, vpcConfigurationDescription: VpcConfigurationDescription? = nil) {
            self.bufferingHints = bufferingHints
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.clusterEndpoint = clusterEndpoint
            self.domainARN = domainARN
            self.indexName = indexName
            self.indexRotationPeriod = indexRotationPeriod
            self.processingConfiguration = processingConfiguration
            self.retryOptions = retryOptions
            self.roleARN = roleARN
            self.s3BackupMode = s3BackupMode
            self.s3DestinationDescription = s3DestinationDescription
            self.typeName = typeName
            self.vpcConfigurationDescription = vpcConfigurationDescription
        }

        private enum CodingKeys: String, CodingKey {
            case bufferingHints = "BufferingHints"
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case clusterEndpoint = "ClusterEndpoint"
            case domainARN = "DomainARN"
            case indexName = "IndexName"
            case indexRotationPeriod = "IndexRotationPeriod"
            case processingConfiguration = "ProcessingConfiguration"
            case retryOptions = "RetryOptions"
            case roleARN = "RoleARN"
            case s3BackupMode = "S3BackupMode"
            case s3DestinationDescription = "S3DestinationDescription"
            case typeName = "TypeName"
            case vpcConfigurationDescription = "VpcConfigurationDescription"
        }
    }

    public struct ElasticsearchDestinationUpdate: AWSEncodableShape {
        /// The buffering options. If no value is specified, ElasticsearchBufferingHints object default values are used.
        public let bufferingHints: ElasticsearchBufferingHints?
        /// The CloudWatch logging options for your delivery stream.
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// The endpoint to use when communicating with the cluster. Specify either this ClusterEndpoint or the DomainARN field.
        public let clusterEndpoint: String?
        /// The ARN of the Amazon ES domain. The IAM role must have permissions for DescribeDomain, DescribeDomains, and DescribeDomainConfig after assuming the IAM role specified in RoleARN. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
        ///  Specify either ClusterEndpoint or DomainARN.
        public let domainARN: String?
        /// The Elasticsearch index name.
        public let indexName: String?
        /// The Elasticsearch index rotation period. Index rotation appends a timestamp to IndexName to facilitate the expiration of old data. For more information, see Index Rotation for the Amazon ES Destination. Default value is OneDay.
        public let indexRotationPeriod: ElasticsearchIndexRotationPeriod?
        /// The data processing configuration.
        public let processingConfiguration: ProcessingConfiguration?
        /// The retry behavior in case Kinesis Data Firehose is unable to deliver documents to Amazon ES. The default value is 300 (5 minutes).
        public let retryOptions: ElasticsearchRetryOptions?
        /// The Amazon Resource Name (ARN) of the IAM role to be assumed by Kinesis Data Firehose for calling the Amazon ES Configuration API and for indexing documents. For more information, see Grant Kinesis Data Firehose Access to an Amazon S3 Destination and Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
        public let roleARN: String?
        /// The Amazon S3 destination.
        public let s3Update: S3DestinationUpdate?
        /// The Elasticsearch type name. For Elasticsearch 6.x, there can be only one type per index. If you try to specify a new type for an existing index that already has another type, Kinesis Data Firehose returns an error during runtime.
        ///  If you upgrade Elasticsearch from 6.x to 7.x and don’t update your delivery stream, Kinesis Data Firehose still delivers data to Elasticsearch with the old index name and type name. If you want to update your delivery stream with a new index name, provide an empty string for TypeName.
        public let typeName: String?

        public init(bufferingHints: ElasticsearchBufferingHints? = nil, cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, clusterEndpoint: String? = nil, domainARN: String? = nil, indexName: String? = nil, indexRotationPeriod: ElasticsearchIndexRotationPeriod? = nil, processingConfiguration: ProcessingConfiguration? = nil, retryOptions: ElasticsearchRetryOptions? = nil, roleARN: String? = nil, s3Update: S3DestinationUpdate? = nil, typeName: String? = nil) {
            self.bufferingHints = bufferingHints
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.clusterEndpoint = clusterEndpoint
            self.domainARN = domainARN
            self.indexName = indexName
            self.indexRotationPeriod = indexRotationPeriod
            self.processingConfiguration = processingConfiguration
            self.retryOptions = retryOptions
            self.roleARN = roleARN
            self.s3Update = s3Update
            self.typeName = typeName
        }

        public func validate(name: String) throws {
            try self.bufferingHints?.validate(name: "\(name).bufferingHints")
            try self.cloudWatchLoggingOptions?.validate(name: "\(name).cloudWatchLoggingOptions")
            try self.validate(self.clusterEndpoint, name: "clusterEndpoint", parent: name, max: 512)
            try self.validate(self.clusterEndpoint, name: "clusterEndpoint", parent: name, min: 1)
            try self.validate(self.clusterEndpoint, name: "clusterEndpoint", parent: name, pattern: "^https:")
            try self.validate(self.domainARN, name: "domainARN", parent: name, max: 512)
            try self.validate(self.domainARN, name: "domainARN", parent: name, min: 1)
            try self.validate(self.domainARN, name: "domainARN", parent: name, pattern: "^arn:")
            try self.validate(self.indexName, name: "indexName", parent: name, max: 80)
            try self.validate(self.indexName, name: "indexName", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, pattern: ".*")
            try self.processingConfiguration?.validate(name: "\(name).processingConfiguration")
            try self.retryOptions?.validate(name: "\(name).retryOptions")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 512)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "^arn:")
            try self.s3Update?.validate(name: "\(name).s3Update")
            try self.validate(self.typeName, name: "typeName", parent: name, max: 100)
            try self.validate(self.typeName, name: "typeName", parent: name, pattern: ".*")
        }

        private enum CodingKeys: String, CodingKey {
            case bufferingHints = "BufferingHints"
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case clusterEndpoint = "ClusterEndpoint"
            case domainARN = "DomainARN"
            case indexName = "IndexName"
            case indexRotationPeriod = "IndexRotationPeriod"
            case processingConfiguration = "ProcessingConfiguration"
            case retryOptions = "RetryOptions"
            case roleARN = "RoleARN"
            case s3Update = "S3Update"
            case typeName = "TypeName"
        }
    }

    public struct ElasticsearchRetryOptions: AWSEncodableShape & AWSDecodableShape {
        /// After an initial failure to deliver to Amazon ES, the total amount of time during which Kinesis Data Firehose retries delivery (including the first attempt). After this time has elapsed, the failed documents are written to Amazon S3. Default value is 300 seconds (5 minutes). A value of 0 (zero) results in no retries.
        public let durationInSeconds: Int?

        public init(durationInSeconds: Int? = nil) {
            self.durationInSeconds = durationInSeconds
        }

        public func validate(name: String) throws {
            try self.validate(self.durationInSeconds, name: "durationInSeconds", parent: name, max: 7200)
            try self.validate(self.durationInSeconds, name: "durationInSeconds", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case durationInSeconds = "DurationInSeconds"
        }
    }

    public struct EncryptionConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The encryption key.
        public let kmsEncryptionConfig: KMSEncryptionConfig?
        /// Specifically override existing encryption information to ensure that no encryption is used.
        public let noEncryptionConfig: NoEncryptionConfig?

        public init(kmsEncryptionConfig: KMSEncryptionConfig? = nil, noEncryptionConfig: NoEncryptionConfig? = nil) {
            self.kmsEncryptionConfig = kmsEncryptionConfig
            self.noEncryptionConfig = noEncryptionConfig
        }

        public func validate(name: String) throws {
            try self.kmsEncryptionConfig?.validate(name: "\(name).kmsEncryptionConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case kmsEncryptionConfig = "KMSEncryptionConfig"
            case noEncryptionConfig = "NoEncryptionConfig"
        }
    }

    public struct ExtendedS3DestinationConfiguration: AWSEncodableShape {
        /// The ARN of the S3 bucket. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
        public let bucketARN: String
        /// The buffering option.
        public let bufferingHints: BufferingHints?
        /// The Amazon CloudWatch logging options for your delivery stream.
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// The compression format. If no value is specified, the default is UNCOMPRESSED.
        public let compressionFormat: CompressionFormat?
        /// The serializer, deserializer, and schema for converting data from the JSON format to the Parquet or ORC format before writing it to Amazon S3.
        public let dataFormatConversionConfiguration: DataFormatConversionConfiguration?
        /// The configuration of the dynamic partitioning mechanism that creates smaller data sets from the streaming data by partitioning it based on partition keys. Currently, dynamic partitioning is only supported for Amazon S3 destinations.
        public let dynamicPartitioningConfiguration: DynamicPartitioningConfiguration?
        /// The encryption configuration. If no value is specified, the default is no encryption.
        public let encryptionConfiguration: EncryptionConfiguration?
        /// A prefix that Kinesis Data Firehose evaluates and adds to failed records before writing them to S3. This prefix appears immediately following the bucket name. For information about how to specify this prefix, see Custom Prefixes for Amazon S3 Objects.
        public let errorOutputPrefix: String?
        /// The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered Amazon S3 files. You can also specify a custom prefix, as described in Custom Prefixes for Amazon S3 Objects.
        public let prefix: String?
        /// The data processing configuration.
        public let processingConfiguration: ProcessingConfiguration?
        /// The Amazon Resource Name (ARN) of the Amazon Web Services credentials. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
        public let roleARN: String
        /// The configuration for backup in Amazon S3.
        public let s3BackupConfiguration: S3DestinationConfiguration?
        /// The Amazon S3 backup mode. After you create a delivery stream, you can update it to enable Amazon S3 backup if it is disabled. If backup is enabled, you can't update the delivery stream to disable it.
        public let s3BackupMode: S3BackupMode?

        public init(bucketARN: String, bufferingHints: BufferingHints? = nil, cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, compressionFormat: CompressionFormat? = nil, dataFormatConversionConfiguration: DataFormatConversionConfiguration? = nil, dynamicPartitioningConfiguration: DynamicPartitioningConfiguration? = nil, encryptionConfiguration: EncryptionConfiguration? = nil, errorOutputPrefix: String? = nil, prefix: String? = nil, processingConfiguration: ProcessingConfiguration? = nil, roleARN: String, s3BackupConfiguration: S3DestinationConfiguration? = nil, s3BackupMode: S3BackupMode? = nil) {
            self.bucketARN = bucketARN
            self.bufferingHints = bufferingHints
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.compressionFormat = compressionFormat
            self.dataFormatConversionConfiguration = dataFormatConversionConfiguration
            self.dynamicPartitioningConfiguration = dynamicPartitioningConfiguration
            self.encryptionConfiguration = encryptionConfiguration
            self.errorOutputPrefix = errorOutputPrefix
            self.prefix = prefix
            self.processingConfiguration = processingConfiguration
            self.roleARN = roleARN
            self.s3BackupConfiguration = s3BackupConfiguration
            self.s3BackupMode = s3BackupMode
        }

        public func validate(name: String) throws {
            try self.validate(self.bucketARN, name: "bucketARN", parent: name, max: 2048)
            try self.validate(self.bucketARN, name: "bucketARN", parent: name, min: 1)
            try self.validate(self.bucketARN, name: "bucketARN", parent: name, pattern: "^arn:")
            try self.bufferingHints?.validate(name: "\(name).bufferingHints")
            try self.cloudWatchLoggingOptions?.validate(name: "\(name).cloudWatchLoggingOptions")
            try self.dataFormatConversionConfiguration?.validate(name: "\(name).dataFormatConversionConfiguration")
            try self.dynamicPartitioningConfiguration?.validate(name: "\(name).dynamicPartitioningConfiguration")
            try self.encryptionConfiguration?.validate(name: "\(name).encryptionConfiguration")
            try self.validate(self.errorOutputPrefix, name: "errorOutputPrefix", parent: name, max: 1024)
            try self.validate(self.errorOutputPrefix, name: "errorOutputPrefix", parent: name, pattern: ".*")
            try self.validate(self.prefix, name: "prefix", parent: name, max: 1024)
            try self.validate(self.prefix, name: "prefix", parent: name, pattern: ".*")
            try self.processingConfiguration?.validate(name: "\(name).processingConfiguration")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 512)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "^arn:")
            try self.s3BackupConfiguration?.validate(name: "\(name).s3BackupConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case bucketARN = "BucketARN"
            case bufferingHints = "BufferingHints"
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case compressionFormat = "CompressionFormat"
            case dataFormatConversionConfiguration = "DataFormatConversionConfiguration"
            case dynamicPartitioningConfiguration = "DynamicPartitioningConfiguration"
            case encryptionConfiguration = "EncryptionConfiguration"
            case errorOutputPrefix = "ErrorOutputPrefix"
            case prefix = "Prefix"
            case processingConfiguration = "ProcessingConfiguration"
            case roleARN = "RoleARN"
            case s3BackupConfiguration = "S3BackupConfiguration"
            case s3BackupMode = "S3BackupMode"
        }
    }

    public struct ExtendedS3DestinationDescription: AWSDecodableShape {
        /// The ARN of the S3 bucket. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
        public let bucketARN: String
        /// The buffering option.
        public let bufferingHints: BufferingHints
        /// The Amazon CloudWatch logging options for your delivery stream.
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// The compression format. If no value is specified, the default is UNCOMPRESSED.
        public let compressionFormat: CompressionFormat
        /// The serializer, deserializer, and schema for converting data from the JSON format to the Parquet or ORC format before writing it to Amazon S3.
        public let dataFormatConversionConfiguration: DataFormatConversionConfiguration?
        /// The configuration of the dynamic partitioning mechanism that creates smaller data sets from the streaming data by partitioning it based on partition keys. Currently, dynamic partitioning is only supported for Amazon S3 destinations.
        public let dynamicPartitioningConfiguration: DynamicPartitioningConfiguration?
        /// The encryption configuration. If no value is specified, the default is no encryption.
        public let encryptionConfiguration: EncryptionConfiguration
        /// A prefix that Kinesis Data Firehose evaluates and adds to failed records before writing them to S3. This prefix appears immediately following the bucket name. For information about how to specify this prefix, see Custom Prefixes for Amazon S3 Objects.
        public let errorOutputPrefix: String?
        /// The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered Amazon S3 files. You can also specify a custom prefix, as described in Custom Prefixes for Amazon S3 Objects.
        public let prefix: String?
        /// The data processing configuration.
        public let processingConfiguration: ProcessingConfiguration?
        /// The Amazon Resource Name (ARN) of the Amazon Web Services credentials. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
        public let roleARN: String
        /// The configuration for backup in Amazon S3.
        public let s3BackupDescription: S3DestinationDescription?
        /// The Amazon S3 backup mode.
        public let s3BackupMode: S3BackupMode?

        public init(bucketARN: String, bufferingHints: BufferingHints, cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, compressionFormat: CompressionFormat, dataFormatConversionConfiguration: DataFormatConversionConfiguration? = nil, dynamicPartitioningConfiguration: DynamicPartitioningConfiguration? = nil, encryptionConfiguration: EncryptionConfiguration, errorOutputPrefix: String? = nil, prefix: String? = nil, processingConfiguration: ProcessingConfiguration? = nil, roleARN: String, s3BackupDescription: S3DestinationDescription? = nil, s3BackupMode: S3BackupMode? = nil) {
            self.bucketARN = bucketARN
            self.bufferingHints = bufferingHints
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.compressionFormat = compressionFormat
            self.dataFormatConversionConfiguration = dataFormatConversionConfiguration
            self.dynamicPartitioningConfiguration = dynamicPartitioningConfiguration
            self.encryptionConfiguration = encryptionConfiguration
            self.errorOutputPrefix = errorOutputPrefix
            self.prefix = prefix
            self.processingConfiguration = processingConfiguration
            self.roleARN = roleARN
            self.s3BackupDescription = s3BackupDescription
            self.s3BackupMode = s3BackupMode
        }

        private enum CodingKeys: String, CodingKey {
            case bucketARN = "BucketARN"
            case bufferingHints = "BufferingHints"
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case compressionFormat = "CompressionFormat"
            case dataFormatConversionConfiguration = "DataFormatConversionConfiguration"
            case dynamicPartitioningConfiguration = "DynamicPartitioningConfiguration"
            case encryptionConfiguration = "EncryptionConfiguration"
            case errorOutputPrefix = "ErrorOutputPrefix"
            case prefix = "Prefix"
            case processingConfiguration = "ProcessingConfiguration"
            case roleARN = "RoleARN"
            case s3BackupDescription = "S3BackupDescription"
            case s3BackupMode = "S3BackupMode"
        }
    }

    public struct ExtendedS3DestinationUpdate: AWSEncodableShape {
        /// The ARN of the S3 bucket. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
        public let bucketARN: String?
        /// The buffering option.
        public let bufferingHints: BufferingHints?
        /// The Amazon CloudWatch logging options for your delivery stream.
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// The compression format. If no value is specified, the default is UNCOMPRESSED.
        public let compressionFormat: CompressionFormat?
        /// The serializer, deserializer, and schema for converting data from the JSON format to the Parquet or ORC format before writing it to Amazon S3.
        public let dataFormatConversionConfiguration: DataFormatConversionConfiguration?
        /// The configuration of the dynamic partitioning mechanism that creates smaller data sets from the streaming data by partitioning it based on partition keys. Currently, dynamic partitioning is only supported for Amazon S3 destinations.
        public let dynamicPartitioningConfiguration: DynamicPartitioningConfiguration?
        /// The encryption configuration. If no value is specified, the default is no encryption.
        public let encryptionConfiguration: EncryptionConfiguration?
        /// A prefix that Kinesis Data Firehose evaluates and adds to failed records before writing them to S3. This prefix appears immediately following the bucket name. For information about how to specify this prefix, see Custom Prefixes for Amazon S3 Objects.
        public let errorOutputPrefix: String?
        /// The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered Amazon S3 files. You can also specify a custom prefix, as described in Custom Prefixes for Amazon S3 Objects.
        public let prefix: String?
        /// The data processing configuration.
        public let processingConfiguration: ProcessingConfiguration?
        /// The Amazon Resource Name (ARN) of the Amazon Web Services credentials. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
        public let roleARN: String?
        /// You can update a delivery stream to enable Amazon S3 backup if it is disabled. If backup is enabled, you can't update the delivery stream to disable it.
        public let s3BackupMode: S3BackupMode?
        /// The Amazon S3 destination for backup.
        public let s3BackupUpdate: S3DestinationUpdate?

        public init(bucketARN: String? = nil, bufferingHints: BufferingHints? = nil, cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, compressionFormat: CompressionFormat? = nil, dataFormatConversionConfiguration: DataFormatConversionConfiguration? = nil, dynamicPartitioningConfiguration: DynamicPartitioningConfiguration? = nil, encryptionConfiguration: EncryptionConfiguration? = nil, errorOutputPrefix: String? = nil, prefix: String? = nil, processingConfiguration: ProcessingConfiguration? = nil, roleARN: String? = nil, s3BackupMode: S3BackupMode? = nil, s3BackupUpdate: S3DestinationUpdate? = nil) {
            self.bucketARN = bucketARN
            self.bufferingHints = bufferingHints
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.compressionFormat = compressionFormat
            self.dataFormatConversionConfiguration = dataFormatConversionConfiguration
            self.dynamicPartitioningConfiguration = dynamicPartitioningConfiguration
            self.encryptionConfiguration = encryptionConfiguration
            self.errorOutputPrefix = errorOutputPrefix
            self.prefix = prefix
            self.processingConfiguration = processingConfiguration
            self.roleARN = roleARN
            self.s3BackupMode = s3BackupMode
            self.s3BackupUpdate = s3BackupUpdate
        }

        public func validate(name: String) throws {
            try self.validate(self.bucketARN, name: "bucketARN", parent: name, max: 2048)
            try self.validate(self.bucketARN, name: "bucketARN", parent: name, min: 1)
            try self.validate(self.bucketARN, name: "bucketARN", parent: name, pattern: "^arn:")
            try self.bufferingHints?.validate(name: "\(name).bufferingHints")
            try self.cloudWatchLoggingOptions?.validate(name: "\(name).cloudWatchLoggingOptions")
            try self.dataFormatConversionConfiguration?.validate(name: "\(name).dataFormatConversionConfiguration")
            try self.dynamicPartitioningConfiguration?.validate(name: "\(name).dynamicPartitioningConfiguration")
            try self.encryptionConfiguration?.validate(name: "\(name).encryptionConfiguration")
            try self.validate(self.errorOutputPrefix, name: "errorOutputPrefix", parent: name, max: 1024)
            try self.validate(self.errorOutputPrefix, name: "errorOutputPrefix", parent: name, pattern: ".*")
            try self.validate(self.prefix, name: "prefix", parent: name, max: 1024)
            try self.validate(self.prefix, name: "prefix", parent: name, pattern: ".*")
            try self.processingConfiguration?.validate(name: "\(name).processingConfiguration")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 512)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "^arn:")
            try self.s3BackupUpdate?.validate(name: "\(name).s3BackupUpdate")
        }

        private enum CodingKeys: String, CodingKey {
            case bucketARN = "BucketARN"
            case bufferingHints = "BufferingHints"
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case compressionFormat = "CompressionFormat"
            case dataFormatConversionConfiguration = "DataFormatConversionConfiguration"
            case dynamicPartitioningConfiguration = "DynamicPartitioningConfiguration"
            case encryptionConfiguration = "EncryptionConfiguration"
            case errorOutputPrefix = "ErrorOutputPrefix"
            case prefix = "Prefix"
            case processingConfiguration = "ProcessingConfiguration"
            case roleARN = "RoleARN"
            case s3BackupMode = "S3BackupMode"
            case s3BackupUpdate = "S3BackupUpdate"
        }
    }

    public struct FailureDescription: AWSDecodableShape {
        /// A message providing details about the error that caused the failure.
        public let details: String
        /// The type of error that caused the failure.
        public let type: DeliveryStreamFailureType

        public init(details: String, type: DeliveryStreamFailureType) {
            self.details = details
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case details = "Details"
            case type = "Type"
        }
    }

    public struct HiveJsonSerDe: AWSEncodableShape & AWSDecodableShape {
        /// Indicates how you want Kinesis Data Firehose to parse the date and timestamps that may be present in your input data JSON. To specify these format strings, follow the pattern syntax of JodaTime's DateTimeFormat format strings. For more information, see Class DateTimeFormat. You can also use the special value millis to parse timestamps in epoch milliseconds. If you don't specify a format, Kinesis Data Firehose uses java.sql.Timestamp::valueOf by default.
        public let timestampFormats: [String]?

        public init(timestampFormats: [String]? = nil) {
            self.timestampFormats = timestampFormats
        }

        public func validate(name: String) throws {
            try self.timestampFormats?.forEach {
                try validate($0, name: "timestampFormats[]", parent: name, max: 1024)
                try validate($0, name: "timestampFormats[]", parent: name, min: 1)
                try validate($0, name: "timestampFormats[]", parent: name, pattern: "^(?!\\s*$).+$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case timestampFormats = "TimestampFormats"
        }
    }

    public struct HttpEndpointBufferingHints: AWSEncodableShape & AWSDecodableShape {
        /// Buffer incoming data for the specified period of time, in seconds, before delivering it to the destination. The default value is 300 (5 minutes).
        public let intervalInSeconds: Int?
        /// Buffer incoming data to the specified size, in MBs, before delivering it to the destination. The default value is 5.  We recommend setting this parameter to a value greater than the amount of data you typically ingest into the delivery stream in 10 seconds. For example, if you typically ingest data at 1 MB/sec, the value should be 10 MB or higher.
        public let sizeInMBs: Int?

        public init(intervalInSeconds: Int? = nil, sizeInMBs: Int? = nil) {
            self.intervalInSeconds = intervalInSeconds
            self.sizeInMBs = sizeInMBs
        }

        public func validate(name: String) throws {
            try self.validate(self.intervalInSeconds, name: "intervalInSeconds", parent: name, max: 900)
            try self.validate(self.intervalInSeconds, name: "intervalInSeconds", parent: name, min: 60)
            try self.validate(self.sizeInMBs, name: "sizeInMBs", parent: name, max: 64)
            try self.validate(self.sizeInMBs, name: "sizeInMBs", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case intervalInSeconds = "IntervalInSeconds"
            case sizeInMBs = "SizeInMBs"
        }
    }

    public struct HttpEndpointCommonAttribute: AWSEncodableShape & AWSDecodableShape {
        /// The name of the HTTP endpoint common attribute.
        public let attributeName: String
        /// The value of the HTTP endpoint common attribute.
        public let attributeValue: String

        public init(attributeName: String, attributeValue: String) {
            self.attributeName = attributeName
            self.attributeValue = attributeValue
        }

        public func validate(name: String) throws {
            try self.validate(self.attributeName, name: "attributeName", parent: name, max: 256)
            try self.validate(self.attributeName, name: "attributeName", parent: name, min: 1)
            try self.validate(self.attributeName, name: "attributeName", parent: name, pattern: "^(?!\\s*$).+$")
            try self.validate(self.attributeValue, name: "attributeValue", parent: name, max: 1024)
            try self.validate(self.attributeValue, name: "attributeValue", parent: name, pattern: ".*")
        }

        private enum CodingKeys: String, CodingKey {
            case attributeName = "AttributeName"
            case attributeValue = "AttributeValue"
        }
    }

    public struct HttpEndpointConfiguration: AWSEncodableShape {
        /// The access key required for Kinesis Firehose to authenticate with the HTTP endpoint selected as the destination.
        public let accessKey: String?
        /// The name of the HTTP endpoint selected as the destination.
        public let name: String?
        /// The URL of the HTTP endpoint selected as the destination.  If you choose an HTTP endpoint as your destination, review and follow the instructions in the Appendix - HTTP Endpoint Delivery Request and Response Specifications.
        public let url: String

        public init(accessKey: String? = nil, name: String? = nil, url: String) {
            self.accessKey = accessKey
            self.name = name
            self.url = url
        }

        public func validate(name: String) throws {
            try self.validate(self.accessKey, name: "accessKey", parent: name, max: 4096)
            try self.validate(self.accessKey, name: "accessKey", parent: name, pattern: ".*")
            try self.validate(self.name, name: "name", parent: name, max: 256)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "^(?!\\s*$).+$")
            try self.validate(self.url, name: "url", parent: name, max: 1000)
            try self.validate(self.url, name: "url", parent: name, min: 1)
            try self.validate(self.url, name: "url", parent: name, pattern: "^https://")
        }

        private enum CodingKeys: String, CodingKey {
            case accessKey = "AccessKey"
            case name = "Name"
            case url = "Url"
        }
    }

    public struct HttpEndpointDescription: AWSDecodableShape {
        /// The name of the HTTP endpoint selected as the destination.
        public let name: String?
        /// The URL of the HTTP endpoint selected as the destination.
        public let url: String?

        public init(name: String? = nil, url: String? = nil) {
            self.name = name
            self.url = url
        }

        private enum CodingKeys: String, CodingKey {
            case name = "Name"
            case url = "Url"
        }
    }

    public struct HttpEndpointDestinationConfiguration: AWSEncodableShape {
        /// The buffering options that can be used before data is delivered to the specified destination. Kinesis Data Firehose treats these options as hints, and it might choose to use more optimal values. The SizeInMBs and IntervalInSeconds parameters are optional. However, if you specify a value for one of them, you must also provide a value for the other.
        public let bufferingHints: HttpEndpointBufferingHints?
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// The configuration of the HTTP endpoint selected as the destination.
        public let endpointConfiguration: HttpEndpointConfiguration
        public let processingConfiguration: ProcessingConfiguration?
        /// The configuration of the requeste sent to the HTTP endpoint specified as the destination.
        public let requestConfiguration: HttpEndpointRequestConfiguration?
        /// Describes the retry behavior in case Kinesis Data Firehose is unable to deliver data to the specified HTTP endpoint destination, or if it doesn't receive a valid acknowledgment of receipt from the specified HTTP endpoint destination.
        public let retryOptions: HttpEndpointRetryOptions?
        /// Kinesis Data Firehose uses this IAM role for all the permissions that the delivery stream needs.
        public let roleARN: String?
        /// Describes the S3 bucket backup options for the data that Kinesis Data Firehose delivers to the HTTP endpoint destination. You can back up all documents (AllData) or only the documents that Kinesis Data Firehose could not deliver to the specified HTTP endpoint destination (FailedDataOnly).
        public let s3BackupMode: HttpEndpointS3BackupMode?
        public let s3Configuration: S3DestinationConfiguration

        public init(bufferingHints: HttpEndpointBufferingHints? = nil, cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, endpointConfiguration: HttpEndpointConfiguration, processingConfiguration: ProcessingConfiguration? = nil, requestConfiguration: HttpEndpointRequestConfiguration? = nil, retryOptions: HttpEndpointRetryOptions? = nil, roleARN: String? = nil, s3BackupMode: HttpEndpointS3BackupMode? = nil, s3Configuration: S3DestinationConfiguration) {
            self.bufferingHints = bufferingHints
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.endpointConfiguration = endpointConfiguration
            self.processingConfiguration = processingConfiguration
            self.requestConfiguration = requestConfiguration
            self.retryOptions = retryOptions
            self.roleARN = roleARN
            self.s3BackupMode = s3BackupMode
            self.s3Configuration = s3Configuration
        }

        public func validate(name: String) throws {
            try self.bufferingHints?.validate(name: "\(name).bufferingHints")
            try self.cloudWatchLoggingOptions?.validate(name: "\(name).cloudWatchLoggingOptions")
            try self.endpointConfiguration.validate(name: "\(name).endpointConfiguration")
            try self.processingConfiguration?.validate(name: "\(name).processingConfiguration")
            try self.requestConfiguration?.validate(name: "\(name).requestConfiguration")
            try self.retryOptions?.validate(name: "\(name).retryOptions")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 512)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "^arn:")
            try self.s3Configuration.validate(name: "\(name).s3Configuration")
        }

        private enum CodingKeys: String, CodingKey {
            case bufferingHints = "BufferingHints"
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case endpointConfiguration = "EndpointConfiguration"
            case processingConfiguration = "ProcessingConfiguration"
            case requestConfiguration = "RequestConfiguration"
            case retryOptions = "RetryOptions"
            case roleARN = "RoleARN"
            case s3BackupMode = "S3BackupMode"
            case s3Configuration = "S3Configuration"
        }
    }

    public struct HttpEndpointDestinationDescription: AWSDecodableShape {
        /// Describes buffering options that can be applied to the data before it is delivered to the HTTPS endpoint destination. Kinesis Data Firehose teats these options as hints, and it might choose to use more optimal values. The SizeInMBs and IntervalInSeconds parameters are optional. However, if specify a value for one of them, you must also provide a value for the other.
        public let bufferingHints: HttpEndpointBufferingHints?
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// The configuration of the specified HTTP endpoint destination.
        public let endpointConfiguration: HttpEndpointDescription?
        public let processingConfiguration: ProcessingConfiguration?
        /// The configuration of request sent to the HTTP endpoint specified as the destination.
        public let requestConfiguration: HttpEndpointRequestConfiguration?
        /// Describes the retry behavior in case Kinesis Data Firehose is unable to deliver data to the specified HTTP endpoint destination, or if it doesn't receive a valid acknowledgment of receipt from the specified HTTP endpoint destination.
        public let retryOptions: HttpEndpointRetryOptions?
        /// Kinesis Data Firehose uses this IAM role for all the permissions that the delivery stream needs.
        public let roleARN: String?
        /// Describes the S3 bucket backup options for the data that Kinesis Firehose delivers to the HTTP endpoint destination. You can back up all documents (AllData) or only the documents that Kinesis Data Firehose could not deliver to the specified HTTP endpoint destination (FailedDataOnly).
        public let s3BackupMode: HttpEndpointS3BackupMode?
        public let s3DestinationDescription: S3DestinationDescription?

        public init(bufferingHints: HttpEndpointBufferingHints? = nil, cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, endpointConfiguration: HttpEndpointDescription? = nil, processingConfiguration: ProcessingConfiguration? = nil, requestConfiguration: HttpEndpointRequestConfiguration? = nil, retryOptions: HttpEndpointRetryOptions? = nil, roleARN: String? = nil, s3BackupMode: HttpEndpointS3BackupMode? = nil, s3DestinationDescription: S3DestinationDescription? = nil) {
            self.bufferingHints = bufferingHints
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.endpointConfiguration = endpointConfiguration
            self.processingConfiguration = processingConfiguration
            self.requestConfiguration = requestConfiguration
            self.retryOptions = retryOptions
            self.roleARN = roleARN
            self.s3BackupMode = s3BackupMode
            self.s3DestinationDescription = s3DestinationDescription
        }

        private enum CodingKeys: String, CodingKey {
            case bufferingHints = "BufferingHints"
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case endpointConfiguration = "EndpointConfiguration"
            case processingConfiguration = "ProcessingConfiguration"
            case requestConfiguration = "RequestConfiguration"
            case retryOptions = "RetryOptions"
            case roleARN = "RoleARN"
            case s3BackupMode = "S3BackupMode"
            case s3DestinationDescription = "S3DestinationDescription"
        }
    }

    public struct HttpEndpointDestinationUpdate: AWSEncodableShape {
        /// Describes buffering options that can be applied to the data before it is delivered to the HTTPS endpoint destination. Kinesis Data Firehose teats these options as hints, and it might choose to use more optimal values. The SizeInMBs and IntervalInSeconds parameters are optional. However, if specify a value for one of them, you must also provide a value for the other.
        public let bufferingHints: HttpEndpointBufferingHints?
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// Describes the configuration of the HTTP endpoint destination.
        public let endpointConfiguration: HttpEndpointConfiguration?
        public let processingConfiguration: ProcessingConfiguration?
        /// The configuration of the request sent to the HTTP endpoint specified as the destination.
        public let requestConfiguration: HttpEndpointRequestConfiguration?
        /// Describes the retry behavior in case Kinesis Data Firehose is unable to deliver data to the specified HTTP endpoint destination, or if it doesn't receive a valid acknowledgment of receipt from the specified HTTP endpoint destination.
        public let retryOptions: HttpEndpointRetryOptions?
        /// Kinesis Data Firehose uses this IAM role for all the permissions that the delivery stream needs.
        public let roleARN: String?
        /// Describes the S3 bucket backup options for the data that Kinesis Firehose delivers to the HTTP endpoint destination. You can back up all documents (AllData) or only the documents that Kinesis Data Firehose could not deliver to the specified HTTP endpoint destination (FailedDataOnly).
        public let s3BackupMode: HttpEndpointS3BackupMode?
        public let s3Update: S3DestinationUpdate?

        public init(bufferingHints: HttpEndpointBufferingHints? = nil, cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, endpointConfiguration: HttpEndpointConfiguration? = nil, processingConfiguration: ProcessingConfiguration? = nil, requestConfiguration: HttpEndpointRequestConfiguration? = nil, retryOptions: HttpEndpointRetryOptions? = nil, roleARN: String? = nil, s3BackupMode: HttpEndpointS3BackupMode? = nil, s3Update: S3DestinationUpdate? = nil) {
            self.bufferingHints = bufferingHints
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.endpointConfiguration = endpointConfiguration
            self.processingConfiguration = processingConfiguration
            self.requestConfiguration = requestConfiguration
            self.retryOptions = retryOptions
            self.roleARN = roleARN
            self.s3BackupMode = s3BackupMode
            self.s3Update = s3Update
        }

        public func validate(name: String) throws {
            try self.bufferingHints?.validate(name: "\(name).bufferingHints")
            try self.cloudWatchLoggingOptions?.validate(name: "\(name).cloudWatchLoggingOptions")
            try self.endpointConfiguration?.validate(name: "\(name).endpointConfiguration")
            try self.processingConfiguration?.validate(name: "\(name).processingConfiguration")
            try self.requestConfiguration?.validate(name: "\(name).requestConfiguration")
            try self.retryOptions?.validate(name: "\(name).retryOptions")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 512)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "^arn:")
            try self.s3Update?.validate(name: "\(name).s3Update")
        }

        private enum CodingKeys: String, CodingKey {
            case bufferingHints = "BufferingHints"
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case endpointConfiguration = "EndpointConfiguration"
            case processingConfiguration = "ProcessingConfiguration"
            case requestConfiguration = "RequestConfiguration"
            case retryOptions = "RetryOptions"
            case roleARN = "RoleARN"
            case s3BackupMode = "S3BackupMode"
            case s3Update = "S3Update"
        }
    }

    public struct HttpEndpointRequestConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Describes the metadata sent to the HTTP endpoint destination.
        public let commonAttributes: [HttpEndpointCommonAttribute]?
        /// Kinesis Data Firehose uses the content encoding to compress the body of a request before sending the request to the destination. For more information, see Content-Encoding in MDN Web Docs, the official Mozilla documentation.
        public let contentEncoding: ContentEncoding?

        public init(commonAttributes: [HttpEndpointCommonAttribute]? = nil, contentEncoding: ContentEncoding? = nil) {
            self.commonAttributes = commonAttributes
            self.contentEncoding = contentEncoding
        }

        public func validate(name: String) throws {
            try self.commonAttributes?.forEach {
                try $0.validate(name: "\(name).commonAttributes[]")
            }
            try self.validate(self.commonAttributes, name: "commonAttributes", parent: name, max: 50)
        }

        private enum CodingKeys: String, CodingKey {
            case commonAttributes = "CommonAttributes"
            case contentEncoding = "ContentEncoding"
        }
    }

    public struct HttpEndpointRetryOptions: AWSEncodableShape & AWSDecodableShape {
        /// The total amount of time that Kinesis Data Firehose spends on retries. This duration starts after the initial attempt to send data to the custom destination via HTTPS endpoint fails. It doesn't include the periods during which Kinesis Data Firehose waits for acknowledgment from the specified destination after each attempt.
        public let durationInSeconds: Int?

        public init(durationInSeconds: Int? = nil) {
            self.durationInSeconds = durationInSeconds
        }

        public func validate(name: String) throws {
            try self.validate(self.durationInSeconds, name: "durationInSeconds", parent: name, max: 7200)
            try self.validate(self.durationInSeconds, name: "durationInSeconds", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case durationInSeconds = "DurationInSeconds"
        }
    }

    public struct InputFormatConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Specifies which deserializer to use. You can choose either the Apache Hive JSON SerDe or the OpenX JSON SerDe. If both are non-null, the server rejects the request.
        public let deserializer: Deserializer?

        public init(deserializer: Deserializer? = nil) {
            self.deserializer = deserializer
        }

        public func validate(name: String) throws {
            try self.deserializer?.validate(name: "\(name).deserializer")
        }

        private enum CodingKeys: String, CodingKey {
            case deserializer = "Deserializer"
        }
    }

    public struct KMSEncryptionConfig: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the encryption key. Must belong to the same Amazon Web Services Region as the destination Amazon S3 bucket. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
        public let awskmsKeyARN: String

        public init(awskmsKeyARN: String) {
            self.awskmsKeyARN = awskmsKeyARN
        }

        public func validate(name: String) throws {
            try self.validate(self.awskmsKeyARN, name: "awskmsKeyARN", parent: name, max: 512)
            try self.validate(self.awskmsKeyARN, name: "awskmsKeyARN", parent: name, min: 1)
            try self.validate(self.awskmsKeyARN, name: "awskmsKeyARN", parent: name, pattern: "^arn:")
        }

        private enum CodingKeys: String, CodingKey {
            case awskmsKeyARN = "AWSKMSKeyARN"
        }
    }

    public struct KinesisStreamSourceConfiguration: AWSEncodableShape {
        /// The ARN of the source Kinesis data stream. For more information, see Amazon Kinesis Data Streams ARN Format.
        public let kinesisStreamARN: String
        /// The ARN of the role that provides access to the source Kinesis data stream. For more information, see Amazon Web Services Identity and Access Management (IAM) ARN Format.
        public let roleARN: String

        public init(kinesisStreamARN: String, roleARN: String) {
            self.kinesisStreamARN = kinesisStreamARN
            self.roleARN = roleARN
        }

        public func validate(name: String) throws {
            try self.validate(self.kinesisStreamARN, name: "kinesisStreamARN", parent: name, max: 512)
            try self.validate(self.kinesisStreamARN, name: "kinesisStreamARN", parent: name, min: 1)
            try self.validate(self.kinesisStreamARN, name: "kinesisStreamARN", parent: name, pattern: "^arn:")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 512)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "^arn:")
        }

        private enum CodingKeys: String, CodingKey {
            case kinesisStreamARN = "KinesisStreamARN"
            case roleARN = "RoleARN"
        }
    }

    public struct KinesisStreamSourceDescription: AWSDecodableShape {
        /// Kinesis Data Firehose starts retrieving records from the Kinesis data stream starting with this timestamp.
        public let deliveryStartTimestamp: Date?
        /// The Amazon Resource Name (ARN) of the source Kinesis data stream. For more information, see Amazon Kinesis Data Streams ARN Format.
        public let kinesisStreamARN: String?
        /// The ARN of the role used by the source Kinesis data stream. For more information, see Amazon Web Services Identity and Access Management (IAM) ARN Format.
        public let roleARN: String?

        public init(deliveryStartTimestamp: Date? = nil, kinesisStreamARN: String? = nil, roleARN: String? = nil) {
            self.deliveryStartTimestamp = deliveryStartTimestamp
            self.kinesisStreamARN = kinesisStreamARN
            self.roleARN = roleARN
        }

        private enum CodingKeys: String, CodingKey {
            case deliveryStartTimestamp = "DeliveryStartTimestamp"
            case kinesisStreamARN = "KinesisStreamARN"
            case roleARN = "RoleARN"
        }
    }

    public struct ListDeliveryStreamsInput: AWSEncodableShape {
        /// The delivery stream type. This can be one of the following values:    DirectPut: Provider applications access the delivery stream directly.    KinesisStreamAsSource: The delivery stream uses a Kinesis data stream as a source.   This parameter is optional. If this parameter is omitted, delivery streams of all types are returned.
        public let deliveryStreamType: DeliveryStreamType?
        /// The list of delivery streams returned by this call to ListDeliveryStreams will start with the delivery stream whose name comes alphabetically immediately after the name you specify in ExclusiveStartDeliveryStreamName.
        public let exclusiveStartDeliveryStreamName: String?
        /// The maximum number of delivery streams to list. The default value is 10.
        public let limit: Int?

        public init(deliveryStreamType: DeliveryStreamType? = nil, exclusiveStartDeliveryStreamName: String? = nil, limit: Int? = nil) {
            self.deliveryStreamType = deliveryStreamType
            self.exclusiveStartDeliveryStreamName = exclusiveStartDeliveryStreamName
            self.limit = limit
        }

        public func validate(name: String) throws {
            try self.validate(self.exclusiveStartDeliveryStreamName, name: "exclusiveStartDeliveryStreamName", parent: name, max: 64)
            try self.validate(self.exclusiveStartDeliveryStreamName, name: "exclusiveStartDeliveryStreamName", parent: name, min: 1)
            try self.validate(self.exclusiveStartDeliveryStreamName, name: "exclusiveStartDeliveryStreamName", parent: name, pattern: "^[a-zA-Z0-9_.-]+$")
            try self.validate(self.limit, name: "limit", parent: name, max: 10000)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case deliveryStreamType = "DeliveryStreamType"
            case exclusiveStartDeliveryStreamName = "ExclusiveStartDeliveryStreamName"
            case limit = "Limit"
        }
    }

    public struct ListDeliveryStreamsOutput: AWSDecodableShape {
        /// The names of the delivery streams.
        public let deliveryStreamNames: [String]
        /// Indicates whether there are more delivery streams available to list.
        public let hasMoreDeliveryStreams: Bool

        public init(deliveryStreamNames: [String], hasMoreDeliveryStreams: Bool) {
            self.deliveryStreamNames = deliveryStreamNames
            self.hasMoreDeliveryStreams = hasMoreDeliveryStreams
        }

        private enum CodingKeys: String, CodingKey {
            case deliveryStreamNames = "DeliveryStreamNames"
            case hasMoreDeliveryStreams = "HasMoreDeliveryStreams"
        }
    }

    public struct ListTagsForDeliveryStreamInput: AWSEncodableShape {
        /// The name of the delivery stream whose tags you want to list.
        public let deliveryStreamName: String
        /// The key to use as the starting point for the list of tags. If you set this parameter, ListTagsForDeliveryStream gets all tags that occur after ExclusiveStartTagKey.
        public let exclusiveStartTagKey: String?
        /// The number of tags to return. If this number is less than the total number of tags associated with the delivery stream, HasMoreTags is set to true in the response. To list additional tags, set ExclusiveStartTagKey to the last key in the response.
        public let limit: Int?

        public init(deliveryStreamName: String, exclusiveStartTagKey: String? = nil, limit: Int? = nil) {
            self.deliveryStreamName = deliveryStreamName
            self.exclusiveStartTagKey = exclusiveStartTagKey
            self.limit = limit
        }

        public func validate(name: String) throws {
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, max: 64)
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, min: 1)
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, pattern: "^[a-zA-Z0-9_.-]+$")
            try self.validate(self.exclusiveStartTagKey, name: "exclusiveStartTagKey", parent: name, max: 128)
            try self.validate(self.exclusiveStartTagKey, name: "exclusiveStartTagKey", parent: name, min: 1)
            try self.validate(self.exclusiveStartTagKey, name: "exclusiveStartTagKey", parent: name, pattern: "^(?!aws:)[\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@%]*$")
            try self.validate(self.limit, name: "limit", parent: name, max: 50)
            try self.validate(self.limit, name: "limit", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case deliveryStreamName = "DeliveryStreamName"
            case exclusiveStartTagKey = "ExclusiveStartTagKey"
            case limit = "Limit"
        }
    }

    public struct ListTagsForDeliveryStreamOutput: AWSDecodableShape {
        /// If this is true in the response, more tags are available. To list the remaining tags, set ExclusiveStartTagKey to the key of the last tag returned and call ListTagsForDeliveryStream again.
        public let hasMoreTags: Bool
        /// A list of tags associated with DeliveryStreamName, starting with the first tag after ExclusiveStartTagKey and up to the specified Limit.
        public let tags: [Tag]

        public init(hasMoreTags: Bool, tags: [Tag]) {
            self.hasMoreTags = hasMoreTags
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case hasMoreTags = "HasMoreTags"
            case tags = "Tags"
        }
    }

    public struct OpenXJsonSerDe: AWSEncodableShape & AWSDecodableShape {
        /// When set to true, which is the default, Kinesis Data Firehose converts JSON keys to lowercase before deserializing them.
        public let caseInsensitive: Bool?
        /// Maps column names to JSON keys that aren't identical to the column names. This is useful when the JSON contains keys that are Hive keywords. For example, timestamp is a Hive keyword. If you have a JSON key named timestamp, set this parameter to {"ts": "timestamp"} to map this key to a column named ts.
        public let columnToJsonKeyMappings: [String: String]?
        /// When set to true, specifies that the names of the keys include dots and that you want Kinesis Data Firehose to replace them with underscores. This is useful because Apache Hive does not allow dots in column names. For example, if the JSON contains a key whose name is "a.b", you can define the column name to be "a_b" when using this option. The default is false.
        public let convertDotsInJsonKeysToUnderscores: Bool?

        public init(caseInsensitive: Bool? = nil, columnToJsonKeyMappings: [String: String]? = nil, convertDotsInJsonKeysToUnderscores: Bool? = nil) {
            self.caseInsensitive = caseInsensitive
            self.columnToJsonKeyMappings = columnToJsonKeyMappings
            self.convertDotsInJsonKeysToUnderscores = convertDotsInJsonKeysToUnderscores
        }

        public func validate(name: String) throws {
            try self.columnToJsonKeyMappings?.forEach {
                try validate($0.key, name: "columnToJsonKeyMappings.key", parent: name, max: 1024)
                try validate($0.key, name: "columnToJsonKeyMappings.key", parent: name, min: 1)
                try validate($0.key, name: "columnToJsonKeyMappings.key", parent: name, pattern: "^\\S+$")
                try validate($0.value, name: "columnToJsonKeyMappings[\"\($0.key)\"]", parent: name, max: 1024)
                try validate($0.value, name: "columnToJsonKeyMappings[\"\($0.key)\"]", parent: name, min: 1)
                try validate($0.value, name: "columnToJsonKeyMappings[\"\($0.key)\"]", parent: name, pattern: "^(?!\\s*$).+$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case caseInsensitive = "CaseInsensitive"
            case columnToJsonKeyMappings = "ColumnToJsonKeyMappings"
            case convertDotsInJsonKeysToUnderscores = "ConvertDotsInJsonKeysToUnderscores"
        }
    }

    public struct OrcSerDe: AWSEncodableShape & AWSDecodableShape {
        /// The Hadoop Distributed File System (HDFS) block size. This is useful if you intend to copy the data from Amazon S3 to HDFS before querying. The default is 256 MiB and the minimum is 64 MiB. Kinesis Data Firehose uses this value for padding calculations.
        public let blockSizeBytes: Int?
        /// The column names for which you want Kinesis Data Firehose to create bloom filters. The default is null.
        public let bloomFilterColumns: [String]?
        /// The Bloom filter false positive probability (FPP). The lower the FPP, the bigger the Bloom filter. The default value is 0.05, the minimum is 0, and the maximum is 1.
        public let bloomFilterFalsePositiveProbability: Double?
        /// The compression code to use over data blocks. The default is SNAPPY.
        public let compression: OrcCompression?
        /// Represents the fraction of the total number of non-null rows. To turn off dictionary encoding, set this fraction to a number that is less than the number of distinct keys in a dictionary. To always use dictionary encoding, set this threshold to 1.
        public let dictionaryKeyThreshold: Double?
        /// Set this to true to indicate that you want stripes to be padded to the HDFS block boundaries. This is useful if you intend to copy the data from Amazon S3 to HDFS before querying. The default is false.
        public let enablePadding: Bool?
        /// The version of the file to write. The possible values are V0_11 and V0_12. The default is V0_12.
        public let formatVersion: OrcFormatVersion?
        /// A number between 0 and 1 that defines the tolerance for block padding as a decimal fraction of stripe size. The default value is 0.05, which means 5 percent of stripe size. For the default values of 64 MiB ORC stripes and 256 MiB HDFS blocks, the default block padding tolerance of 5 percent reserves a maximum of 3.2 MiB for padding within the 256 MiB block. In such a case, if the available size within the block is more than 3.2 MiB, a new, smaller stripe is inserted to fit within that space. This ensures that no stripe crosses block boundaries and causes remote reads within a node-local task. Kinesis Data Firehose ignores this parameter when OrcSerDe$EnablePadding is false.
        public let paddingTolerance: Double?
        /// The number of rows between index entries. The default is 10,000 and the minimum is 1,000.
        public let rowIndexStride: Int?
        /// The number of bytes in each stripe. The default is 64 MiB and the minimum is 8 MiB.
        public let stripeSizeBytes: Int?

        public init(blockSizeBytes: Int? = nil, bloomFilterColumns: [String]? = nil, bloomFilterFalsePositiveProbability: Double? = nil, compression: OrcCompression? = nil, dictionaryKeyThreshold: Double? = nil, enablePadding: Bool? = nil, formatVersion: OrcFormatVersion? = nil, paddingTolerance: Double? = nil, rowIndexStride: Int? = nil, stripeSizeBytes: Int? = nil) {
            self.blockSizeBytes = blockSizeBytes
            self.bloomFilterColumns = bloomFilterColumns
            self.bloomFilterFalsePositiveProbability = bloomFilterFalsePositiveProbability
            self.compression = compression
            self.dictionaryKeyThreshold = dictionaryKeyThreshold
            self.enablePadding = enablePadding
            self.formatVersion = formatVersion
            self.paddingTolerance = paddingTolerance
            self.rowIndexStride = rowIndexStride
            self.stripeSizeBytes = stripeSizeBytes
        }

        public func validate(name: String) throws {
            try self.validate(self.blockSizeBytes, name: "blockSizeBytes", parent: name, min: 67_108_864)
            try self.bloomFilterColumns?.forEach {
                try validate($0, name: "bloomFilterColumns[]", parent: name, max: 1024)
                try validate($0, name: "bloomFilterColumns[]", parent: name, min: 1)
                try validate($0, name: "bloomFilterColumns[]", parent: name, pattern: "^\\S+$")
            }
            try self.validate(self.bloomFilterFalsePositiveProbability, name: "bloomFilterFalsePositiveProbability", parent: name, max: 1.0)
            try self.validate(self.bloomFilterFalsePositiveProbability, name: "bloomFilterFalsePositiveProbability", parent: name, min: 0.0)
            try self.validate(self.dictionaryKeyThreshold, name: "dictionaryKeyThreshold", parent: name, max: 1.0)
            try self.validate(self.dictionaryKeyThreshold, name: "dictionaryKeyThreshold", parent: name, min: 0.0)
            try self.validate(self.paddingTolerance, name: "paddingTolerance", parent: name, max: 1.0)
            try self.validate(self.paddingTolerance, name: "paddingTolerance", parent: name, min: 0.0)
            try self.validate(self.rowIndexStride, name: "rowIndexStride", parent: name, min: 1000)
            try self.validate(self.stripeSizeBytes, name: "stripeSizeBytes", parent: name, min: 8_388_608)
        }

        private enum CodingKeys: String, CodingKey {
            case blockSizeBytes = "BlockSizeBytes"
            case bloomFilterColumns = "BloomFilterColumns"
            case bloomFilterFalsePositiveProbability = "BloomFilterFalsePositiveProbability"
            case compression = "Compression"
            case dictionaryKeyThreshold = "DictionaryKeyThreshold"
            case enablePadding = "EnablePadding"
            case formatVersion = "FormatVersion"
            case paddingTolerance = "PaddingTolerance"
            case rowIndexStride = "RowIndexStride"
            case stripeSizeBytes = "StripeSizeBytes"
        }
    }

    public struct OutputFormatConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Specifies which serializer to use. You can choose either the ORC SerDe or the Parquet SerDe. If both are non-null, the server rejects the request.
        public let serializer: Serializer?

        public init(serializer: Serializer? = nil) {
            self.serializer = serializer
        }

        public func validate(name: String) throws {
            try self.serializer?.validate(name: "\(name).serializer")
        }

        private enum CodingKeys: String, CodingKey {
            case serializer = "Serializer"
        }
    }

    public struct ParquetSerDe: AWSEncodableShape & AWSDecodableShape {
        /// The Hadoop Distributed File System (HDFS) block size. This is useful if you intend to copy the data from Amazon S3 to HDFS before querying. The default is 256 MiB and the minimum is 64 MiB. Kinesis Data Firehose uses this value for padding calculations.
        public let blockSizeBytes: Int?
        /// The compression code to use over data blocks. The possible values are UNCOMPRESSED, SNAPPY, and GZIP, with the default being SNAPPY. Use SNAPPY for higher decompression speed. Use GZIP if the compression ratio is more important than speed.
        public let compression: ParquetCompression?
        /// Indicates whether to enable dictionary compression.
        public let enableDictionaryCompression: Bool?
        /// The maximum amount of padding to apply. This is useful if you intend to copy the data from Amazon S3 to HDFS before querying. The default is 0.
        public let maxPaddingBytes: Int?
        /// The Parquet page size. Column chunks are divided into pages. A page is conceptually an indivisible unit (in terms of compression and encoding). The minimum value is 64 KiB and the default is 1 MiB.
        public let pageSizeBytes: Int?
        /// Indicates the version of row format to output. The possible values are V1 and V2. The default is V1.
        public let writerVersion: ParquetWriterVersion?

        public init(blockSizeBytes: Int? = nil, compression: ParquetCompression? = nil, enableDictionaryCompression: Bool? = nil, maxPaddingBytes: Int? = nil, pageSizeBytes: Int? = nil, writerVersion: ParquetWriterVersion? = nil) {
            self.blockSizeBytes = blockSizeBytes
            self.compression = compression
            self.enableDictionaryCompression = enableDictionaryCompression
            self.maxPaddingBytes = maxPaddingBytes
            self.pageSizeBytes = pageSizeBytes
            self.writerVersion = writerVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.blockSizeBytes, name: "blockSizeBytes", parent: name, min: 67_108_864)
            try self.validate(self.maxPaddingBytes, name: "maxPaddingBytes", parent: name, min: 0)
            try self.validate(self.pageSizeBytes, name: "pageSizeBytes", parent: name, min: 65536)
        }

        private enum CodingKeys: String, CodingKey {
            case blockSizeBytes = "BlockSizeBytes"
            case compression = "Compression"
            case enableDictionaryCompression = "EnableDictionaryCompression"
            case maxPaddingBytes = "MaxPaddingBytes"
            case pageSizeBytes = "PageSizeBytes"
            case writerVersion = "WriterVersion"
        }
    }

    public struct ProcessingConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Enables or disables data processing.
        public let enabled: Bool?
        /// The data processors.
        public let processors: [Processor]?

        public init(enabled: Bool? = nil, processors: [Processor]? = nil) {
            self.enabled = enabled
            self.processors = processors
        }

        public func validate(name: String) throws {
            try self.processors?.forEach {
                try $0.validate(name: "\(name).processors[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
            case processors = "Processors"
        }
    }

    public struct Processor: AWSEncodableShape & AWSDecodableShape {
        /// The processor parameters.
        public let parameters: [ProcessorParameter]?
        /// The type of processor.
        public let type: ProcessorType

        public init(parameters: [ProcessorParameter]? = nil, type: ProcessorType) {
            self.parameters = parameters
            self.type = type
        }

        public func validate(name: String) throws {
            try self.parameters?.forEach {
                try $0.validate(name: "\(name).parameters[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case parameters = "Parameters"
            case type = "Type"
        }
    }

    public struct ProcessorParameter: AWSEncodableShape & AWSDecodableShape {
        /// The name of the parameter. Currently the following default values are supported: 3 for NumberOfRetries and 60 for the BufferIntervalInSeconds. The BufferSizeInMBs ranges between 0.2 MB and up to 3MB. The default buffering hint is 1MB for all destinations, except Splunk. For Splunk, the default buffering hint is 256 KB.
        public let parameterName: ProcessorParameterName
        /// The parameter value.
        public let parameterValue: String

        public init(parameterName: ProcessorParameterName, parameterValue: String) {
            self.parameterName = parameterName
            self.parameterValue = parameterValue
        }

        public func validate(name: String) throws {
            try self.validate(self.parameterValue, name: "parameterValue", parent: name, max: 5120)
            try self.validate(self.parameterValue, name: "parameterValue", parent: name, min: 1)
            try self.validate(self.parameterValue, name: "parameterValue", parent: name, pattern: "^(?!\\s*$).+$")
        }

        private enum CodingKeys: String, CodingKey {
            case parameterName = "ParameterName"
            case parameterValue = "ParameterValue"
        }
    }

    public struct PutRecordBatchInput: AWSEncodableShape {
        /// The name of the delivery stream.
        public let deliveryStreamName: String
        /// One or more records.
        public let records: [Record]

        public init(deliveryStreamName: String, records: [Record]) {
            self.deliveryStreamName = deliveryStreamName
            self.records = records
        }

        public func validate(name: String) throws {
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, max: 64)
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, min: 1)
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, pattern: "^[a-zA-Z0-9_.-]+$")
            try self.records.forEach {
                try $0.validate(name: "\(name).records[]")
            }
            try self.validate(self.records, name: "records", parent: name, max: 500)
            try self.validate(self.records, name: "records", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case deliveryStreamName = "DeliveryStreamName"
            case records = "Records"
        }
    }

    public struct PutRecordBatchOutput: AWSDecodableShape {
        /// Indicates whether server-side encryption (SSE) was enabled during this operation.
        public let encrypted: Bool?
        /// The number of records that might have failed processing. This number might be greater than 0 even if the PutRecordBatch call succeeds. Check FailedPutCount to determine whether there are records that you need to resend.
        public let failedPutCount: Int
        /// The results array. For each record, the index of the response element is the same as the index used in the request array.
        public let requestResponses: [PutRecordBatchResponseEntry]

        public init(encrypted: Bool? = nil, failedPutCount: Int, requestResponses: [PutRecordBatchResponseEntry]) {
            self.encrypted = encrypted
            self.failedPutCount = failedPutCount
            self.requestResponses = requestResponses
        }

        private enum CodingKeys: String, CodingKey {
            case encrypted = "Encrypted"
            case failedPutCount = "FailedPutCount"
            case requestResponses = "RequestResponses"
        }
    }

    public struct PutRecordBatchResponseEntry: AWSDecodableShape {
        /// The error code for an individual record result.
        public let errorCode: String?
        /// The error message for an individual record result.
        public let errorMessage: String?
        /// The ID of the record.
        public let recordId: String?

        public init(errorCode: String? = nil, errorMessage: String? = nil, recordId: String? = nil) {
            self.errorCode = errorCode
            self.errorMessage = errorMessage
            self.recordId = recordId
        }

        private enum CodingKeys: String, CodingKey {
            case errorCode = "ErrorCode"
            case errorMessage = "ErrorMessage"
            case recordId = "RecordId"
        }
    }

    public struct PutRecordInput: AWSEncodableShape {
        /// The name of the delivery stream.
        public let deliveryStreamName: String
        /// The record.
        public let record: Record

        public init(deliveryStreamName: String, record: Record) {
            self.deliveryStreamName = deliveryStreamName
            self.record = record
        }

        public func validate(name: String) throws {
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, max: 64)
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, min: 1)
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, pattern: "^[a-zA-Z0-9_.-]+$")
            try self.record.validate(name: "\(name).record")
        }

        private enum CodingKeys: String, CodingKey {
            case deliveryStreamName = "DeliveryStreamName"
            case record = "Record"
        }
    }

    public struct PutRecordOutput: AWSDecodableShape {
        /// Indicates whether server-side encryption (SSE) was enabled during this operation.
        public let encrypted: Bool?
        /// The ID of the record.
        public let recordId: String

        public init(encrypted: Bool? = nil, recordId: String) {
            self.encrypted = encrypted
            self.recordId = recordId
        }

        private enum CodingKeys: String, CodingKey {
            case encrypted = "Encrypted"
            case recordId = "RecordId"
        }
    }

    public struct Record: AWSEncodableShape {
        /// The data blob, which is base64-encoded when the blob is serialized. The maximum size of the data blob, before base64-encoding, is 1,000 KiB.
        public let data: AWSBase64Data

        public init(data: AWSBase64Data) {
            self.data = data
        }

        public func validate(name: String) throws {
            try self.validate(self.data, name: "data", parent: name, max: 1_024_000)
        }

        private enum CodingKeys: String, CodingKey {
            case data = "Data"
        }
    }

    public struct RedshiftDestinationConfiguration: AWSEncodableShape {
        /// The CloudWatch logging options for your delivery stream.
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// The database connection string.
        public let clusterJDBCURL: String
        /// The COPY command.
        public let copyCommand: CopyCommand
        /// The user password.
        public let password: String
        /// The data processing configuration.
        public let processingConfiguration: ProcessingConfiguration?
        /// The retry behavior in case Kinesis Data Firehose is unable to deliver documents to Amazon Redshift. Default value is 3600 (60 minutes).
        public let retryOptions: RedshiftRetryOptions?
        /// The Amazon Resource Name (ARN) of the Amazon Web Services credentials. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
        public let roleARN: String
        /// The configuration for backup in Amazon S3.
        public let s3BackupConfiguration: S3DestinationConfiguration?
        /// The Amazon S3 backup mode. After you create a delivery stream, you can update it to enable Amazon S3 backup if it is disabled. If backup is enabled, you can't update the delivery stream to disable it.
        public let s3BackupMode: RedshiftS3BackupMode?
        /// The configuration for the intermediate Amazon S3 location from which Amazon Redshift obtains data. Restrictions are described in the topic for CreateDeliveryStream. The compression formats SNAPPY or ZIP cannot be specified in RedshiftDestinationConfiguration.S3Configuration because the Amazon Redshift COPY operation that reads from the S3 bucket doesn't support these compression formats.
        public let s3Configuration: S3DestinationConfiguration
        /// The name of the user.
        public let username: String

        public init(cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, clusterJDBCURL: String, copyCommand: CopyCommand, password: String, processingConfiguration: ProcessingConfiguration? = nil, retryOptions: RedshiftRetryOptions? = nil, roleARN: String, s3BackupConfiguration: S3DestinationConfiguration? = nil, s3BackupMode: RedshiftS3BackupMode? = nil, s3Configuration: S3DestinationConfiguration, username: String) {
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.clusterJDBCURL = clusterJDBCURL
            self.copyCommand = copyCommand
            self.password = password
            self.processingConfiguration = processingConfiguration
            self.retryOptions = retryOptions
            self.roleARN = roleARN
            self.s3BackupConfiguration = s3BackupConfiguration
            self.s3BackupMode = s3BackupMode
            self.s3Configuration = s3Configuration
            self.username = username
        }

        public func validate(name: String) throws {
            try self.cloudWatchLoggingOptions?.validate(name: "\(name).cloudWatchLoggingOptions")
            try self.validate(self.clusterJDBCURL, name: "clusterJDBCURL", parent: name, max: 512)
            try self.validate(self.clusterJDBCURL, name: "clusterJDBCURL", parent: name, min: 1)
            try self.validate(self.clusterJDBCURL, name: "clusterJDBCURL", parent: name, pattern: "^jdbc:(redshift|postgresql)://((?!-)[A-Za-z0-9-]{1,63}(?<!-)\\.)+redshift\\.([a-zA-Z0-9\\.]+):\\d{1,5}/[a-zA-Z0-9_$-]+$")
            try self.copyCommand.validate(name: "\(name).copyCommand")
            try self.validate(self.password, name: "password", parent: name, max: 512)
            try self.validate(self.password, name: "password", parent: name, min: 6)
            try self.validate(self.password, name: "password", parent: name, pattern: ".*")
            try self.processingConfiguration?.validate(name: "\(name).processingConfiguration")
            try self.retryOptions?.validate(name: "\(name).retryOptions")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 512)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "^arn:")
            try self.s3BackupConfiguration?.validate(name: "\(name).s3BackupConfiguration")
            try self.s3Configuration.validate(name: "\(name).s3Configuration")
            try self.validate(self.username, name: "username", parent: name, max: 512)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: ".*")
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case clusterJDBCURL = "ClusterJDBCURL"
            case copyCommand = "CopyCommand"
            case password = "Password"
            case processingConfiguration = "ProcessingConfiguration"
            case retryOptions = "RetryOptions"
            case roleARN = "RoleARN"
            case s3BackupConfiguration = "S3BackupConfiguration"
            case s3BackupMode = "S3BackupMode"
            case s3Configuration = "S3Configuration"
            case username = "Username"
        }
    }

    public struct RedshiftDestinationDescription: AWSDecodableShape {
        /// The Amazon CloudWatch logging options for your delivery stream.
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// The database connection string.
        public let clusterJDBCURL: String
        /// The COPY command.
        public let copyCommand: CopyCommand
        /// The data processing configuration.
        public let processingConfiguration: ProcessingConfiguration?
        /// The retry behavior in case Kinesis Data Firehose is unable to deliver documents to Amazon Redshift. Default value is 3600 (60 minutes).
        public let retryOptions: RedshiftRetryOptions?
        /// The Amazon Resource Name (ARN) of the Amazon Web Services credentials. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
        public let roleARN: String
        /// The configuration for backup in Amazon S3.
        public let s3BackupDescription: S3DestinationDescription?
        /// The Amazon S3 backup mode.
        public let s3BackupMode: RedshiftS3BackupMode?
        /// The Amazon S3 destination.
        public let s3DestinationDescription: S3DestinationDescription
        /// The name of the user.
        public let username: String

        public init(cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, clusterJDBCURL: String, copyCommand: CopyCommand, processingConfiguration: ProcessingConfiguration? = nil, retryOptions: RedshiftRetryOptions? = nil, roleARN: String, s3BackupDescription: S3DestinationDescription? = nil, s3BackupMode: RedshiftS3BackupMode? = nil, s3DestinationDescription: S3DestinationDescription, username: String) {
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.clusterJDBCURL = clusterJDBCURL
            self.copyCommand = copyCommand
            self.processingConfiguration = processingConfiguration
            self.retryOptions = retryOptions
            self.roleARN = roleARN
            self.s3BackupDescription = s3BackupDescription
            self.s3BackupMode = s3BackupMode
            self.s3DestinationDescription = s3DestinationDescription
            self.username = username
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case clusterJDBCURL = "ClusterJDBCURL"
            case copyCommand = "CopyCommand"
            case processingConfiguration = "ProcessingConfiguration"
            case retryOptions = "RetryOptions"
            case roleARN = "RoleARN"
            case s3BackupDescription = "S3BackupDescription"
            case s3BackupMode = "S3BackupMode"
            case s3DestinationDescription = "S3DestinationDescription"
            case username = "Username"
        }
    }

    public struct RedshiftDestinationUpdate: AWSEncodableShape {
        /// The Amazon CloudWatch logging options for your delivery stream.
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// The database connection string.
        public let clusterJDBCURL: String?
        /// The COPY command.
        public let copyCommand: CopyCommand?
        /// The user password.
        public let password: String?
        /// The data processing configuration.
        public let processingConfiguration: ProcessingConfiguration?
        /// The retry behavior in case Kinesis Data Firehose is unable to deliver documents to Amazon Redshift. Default value is 3600 (60 minutes).
        public let retryOptions: RedshiftRetryOptions?
        /// The Amazon Resource Name (ARN) of the Amazon Web Services credentials. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
        public let roleARN: String?
        /// You can update a delivery stream to enable Amazon S3 backup if it is disabled. If backup is enabled, you can't update the delivery stream to disable it.
        public let s3BackupMode: RedshiftS3BackupMode?
        /// The Amazon S3 destination for backup.
        public let s3BackupUpdate: S3DestinationUpdate?
        /// The Amazon S3 destination. The compression formats SNAPPY or ZIP cannot be specified in RedshiftDestinationUpdate.S3Update because the Amazon Redshift COPY operation that reads from the S3 bucket doesn't support these compression formats.
        public let s3Update: S3DestinationUpdate?
        /// The name of the user.
        public let username: String?

        public init(cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, clusterJDBCURL: String? = nil, copyCommand: CopyCommand? = nil, password: String? = nil, processingConfiguration: ProcessingConfiguration? = nil, retryOptions: RedshiftRetryOptions? = nil, roleARN: String? = nil, s3BackupMode: RedshiftS3BackupMode? = nil, s3BackupUpdate: S3DestinationUpdate? = nil, s3Update: S3DestinationUpdate? = nil, username: String? = nil) {
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.clusterJDBCURL = clusterJDBCURL
            self.copyCommand = copyCommand
            self.password = password
            self.processingConfiguration = processingConfiguration
            self.retryOptions = retryOptions
            self.roleARN = roleARN
            self.s3BackupMode = s3BackupMode
            self.s3BackupUpdate = s3BackupUpdate
            self.s3Update = s3Update
            self.username = username
        }

        public func validate(name: String) throws {
            try self.cloudWatchLoggingOptions?.validate(name: "\(name).cloudWatchLoggingOptions")
            try self.validate(self.clusterJDBCURL, name: "clusterJDBCURL", parent: name, max: 512)
            try self.validate(self.clusterJDBCURL, name: "clusterJDBCURL", parent: name, min: 1)
            try self.validate(self.clusterJDBCURL, name: "clusterJDBCURL", parent: name, pattern: "^jdbc:(redshift|postgresql)://((?!-)[A-Za-z0-9-]{1,63}(?<!-)\\.)+redshift\\.([a-zA-Z0-9\\.]+):\\d{1,5}/[a-zA-Z0-9_$-]+$")
            try self.copyCommand?.validate(name: "\(name).copyCommand")
            try self.validate(self.password, name: "password", parent: name, max: 512)
            try self.validate(self.password, name: "password", parent: name, min: 6)
            try self.validate(self.password, name: "password", parent: name, pattern: ".*")
            try self.processingConfiguration?.validate(name: "\(name).processingConfiguration")
            try self.retryOptions?.validate(name: "\(name).retryOptions")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 512)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "^arn:")
            try self.s3BackupUpdate?.validate(name: "\(name).s3BackupUpdate")
            try self.s3Update?.validate(name: "\(name).s3Update")
            try self.validate(self.username, name: "username", parent: name, max: 512)
            try self.validate(self.username, name: "username", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, pattern: ".*")
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case clusterJDBCURL = "ClusterJDBCURL"
            case copyCommand = "CopyCommand"
            case password = "Password"
            case processingConfiguration = "ProcessingConfiguration"
            case retryOptions = "RetryOptions"
            case roleARN = "RoleARN"
            case s3BackupMode = "S3BackupMode"
            case s3BackupUpdate = "S3BackupUpdate"
            case s3Update = "S3Update"
            case username = "Username"
        }
    }

    public struct RedshiftRetryOptions: AWSEncodableShape & AWSDecodableShape {
        /// The length of time during which Kinesis Data Firehose retries delivery after a failure, starting from the initial request and including the first attempt. The default value is 3600 seconds (60 minutes). Kinesis Data Firehose does not retry if the value of DurationInSeconds is 0 (zero) or if the first delivery attempt takes longer than the current value.
        public let durationInSeconds: Int?

        public init(durationInSeconds: Int? = nil) {
            self.durationInSeconds = durationInSeconds
        }

        public func validate(name: String) throws {
            try self.validate(self.durationInSeconds, name: "durationInSeconds", parent: name, max: 7200)
            try self.validate(self.durationInSeconds, name: "durationInSeconds", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case durationInSeconds = "DurationInSeconds"
        }
    }

    public struct RetryOptions: AWSEncodableShape & AWSDecodableShape {
        /// The period of time during which Kinesis Data Firehose retries to deliver data to the specified Amazon S3 prefix.
        public let durationInSeconds: Int?

        public init(durationInSeconds: Int? = nil) {
            self.durationInSeconds = durationInSeconds
        }

        public func validate(name: String) throws {
            try self.validate(self.durationInSeconds, name: "durationInSeconds", parent: name, max: 7200)
            try self.validate(self.durationInSeconds, name: "durationInSeconds", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case durationInSeconds = "DurationInSeconds"
        }
    }

    public struct S3DestinationConfiguration: AWSEncodableShape {
        /// The ARN of the S3 bucket. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
        public let bucketARN: String
        /// The buffering option. If no value is specified, BufferingHints object default values are used.
        public let bufferingHints: BufferingHints?
        /// The CloudWatch logging options for your delivery stream.
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// The compression format. If no value is specified, the default is UNCOMPRESSED. The compression formats SNAPPY or ZIP cannot be specified for Amazon Redshift destinations because they are not supported by the Amazon Redshift COPY operation that reads from the S3 bucket.
        public let compressionFormat: CompressionFormat?
        /// The encryption configuration. If no value is specified, the default is no encryption.
        public let encryptionConfiguration: EncryptionConfiguration?
        /// A prefix that Kinesis Data Firehose evaluates and adds to failed records before writing them to S3. This prefix appears immediately following the bucket name. For information about how to specify this prefix, see Custom Prefixes for Amazon S3 Objects.
        public let errorOutputPrefix: String?
        /// The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered Amazon S3 files. You can also specify a custom prefix, as described in Custom Prefixes for Amazon S3 Objects.
        public let prefix: String?
        /// The Amazon Resource Name (ARN) of the Amazon Web Services credentials. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
        public let roleARN: String

        public init(bucketARN: String, bufferingHints: BufferingHints? = nil, cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, compressionFormat: CompressionFormat? = nil, encryptionConfiguration: EncryptionConfiguration? = nil, errorOutputPrefix: String? = nil, prefix: String? = nil, roleARN: String) {
            self.bucketARN = bucketARN
            self.bufferingHints = bufferingHints
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.compressionFormat = compressionFormat
            self.encryptionConfiguration = encryptionConfiguration
            self.errorOutputPrefix = errorOutputPrefix
            self.prefix = prefix
            self.roleARN = roleARN
        }

        public func validate(name: String) throws {
            try self.validate(self.bucketARN, name: "bucketARN", parent: name, max: 2048)
            try self.validate(self.bucketARN, name: "bucketARN", parent: name, min: 1)
            try self.validate(self.bucketARN, name: "bucketARN", parent: name, pattern: "^arn:")
            try self.bufferingHints?.validate(name: "\(name).bufferingHints")
            try self.cloudWatchLoggingOptions?.validate(name: "\(name).cloudWatchLoggingOptions")
            try self.encryptionConfiguration?.validate(name: "\(name).encryptionConfiguration")
            try self.validate(self.errorOutputPrefix, name: "errorOutputPrefix", parent: name, max: 1024)
            try self.validate(self.errorOutputPrefix, name: "errorOutputPrefix", parent: name, pattern: ".*")
            try self.validate(self.prefix, name: "prefix", parent: name, max: 1024)
            try self.validate(self.prefix, name: "prefix", parent: name, pattern: ".*")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 512)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "^arn:")
        }

        private enum CodingKeys: String, CodingKey {
            case bucketARN = "BucketARN"
            case bufferingHints = "BufferingHints"
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case compressionFormat = "CompressionFormat"
            case encryptionConfiguration = "EncryptionConfiguration"
            case errorOutputPrefix = "ErrorOutputPrefix"
            case prefix = "Prefix"
            case roleARN = "RoleARN"
        }
    }

    public struct S3DestinationDescription: AWSDecodableShape {
        /// The ARN of the S3 bucket. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
        public let bucketARN: String
        /// The buffering option. If no value is specified, BufferingHints object default values are used.
        public let bufferingHints: BufferingHints
        /// The Amazon CloudWatch logging options for your delivery stream.
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// The compression format. If no value is specified, the default is UNCOMPRESSED.
        public let compressionFormat: CompressionFormat
        /// The encryption configuration. If no value is specified, the default is no encryption.
        public let encryptionConfiguration: EncryptionConfiguration
        /// A prefix that Kinesis Data Firehose evaluates and adds to failed records before writing them to S3. This prefix appears immediately following the bucket name. For information about how to specify this prefix, see Custom Prefixes for Amazon S3 Objects.
        public let errorOutputPrefix: String?
        /// The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered Amazon S3 files. You can also specify a custom prefix, as described in Custom Prefixes for Amazon S3 Objects.
        public let prefix: String?
        /// The Amazon Resource Name (ARN) of the Amazon Web Services credentials. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
        public let roleARN: String

        public init(bucketARN: String, bufferingHints: BufferingHints, cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, compressionFormat: CompressionFormat, encryptionConfiguration: EncryptionConfiguration, errorOutputPrefix: String? = nil, prefix: String? = nil, roleARN: String) {
            self.bucketARN = bucketARN
            self.bufferingHints = bufferingHints
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.compressionFormat = compressionFormat
            self.encryptionConfiguration = encryptionConfiguration
            self.errorOutputPrefix = errorOutputPrefix
            self.prefix = prefix
            self.roleARN = roleARN
        }

        private enum CodingKeys: String, CodingKey {
            case bucketARN = "BucketARN"
            case bufferingHints = "BufferingHints"
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case compressionFormat = "CompressionFormat"
            case encryptionConfiguration = "EncryptionConfiguration"
            case errorOutputPrefix = "ErrorOutputPrefix"
            case prefix = "Prefix"
            case roleARN = "RoleARN"
        }
    }

    public struct S3DestinationUpdate: AWSEncodableShape {
        /// The ARN of the S3 bucket. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
        public let bucketARN: String?
        /// The buffering option. If no value is specified, BufferingHints object default values are used.
        public let bufferingHints: BufferingHints?
        /// The CloudWatch logging options for your delivery stream.
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// The compression format. If no value is specified, the default is UNCOMPRESSED. The compression formats SNAPPY or ZIP cannot be specified for Amazon Redshift destinations because they are not supported by the Amazon Redshift COPY operation that reads from the S3 bucket.
        public let compressionFormat: CompressionFormat?
        /// The encryption configuration. If no value is specified, the default is no encryption.
        public let encryptionConfiguration: EncryptionConfiguration?
        /// A prefix that Kinesis Data Firehose evaluates and adds to failed records before writing them to S3. This prefix appears immediately following the bucket name. For information about how to specify this prefix, see Custom Prefixes for Amazon S3 Objects.
        public let errorOutputPrefix: String?
        /// The "YYYY/MM/DD/HH" time format prefix is automatically used for delivered Amazon S3 files. You can also specify a custom prefix, as described in Custom Prefixes for Amazon S3 Objects.
        public let prefix: String?
        /// The Amazon Resource Name (ARN) of the Amazon Web Services credentials. For more information, see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces.
        public let roleARN: String?

        public init(bucketARN: String? = nil, bufferingHints: BufferingHints? = nil, cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, compressionFormat: CompressionFormat? = nil, encryptionConfiguration: EncryptionConfiguration? = nil, errorOutputPrefix: String? = nil, prefix: String? = nil, roleARN: String? = nil) {
            self.bucketARN = bucketARN
            self.bufferingHints = bufferingHints
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.compressionFormat = compressionFormat
            self.encryptionConfiguration = encryptionConfiguration
            self.errorOutputPrefix = errorOutputPrefix
            self.prefix = prefix
            self.roleARN = roleARN
        }

        public func validate(name: String) throws {
            try self.validate(self.bucketARN, name: "bucketARN", parent: name, max: 2048)
            try self.validate(self.bucketARN, name: "bucketARN", parent: name, min: 1)
            try self.validate(self.bucketARN, name: "bucketARN", parent: name, pattern: "^arn:")
            try self.bufferingHints?.validate(name: "\(name).bufferingHints")
            try self.cloudWatchLoggingOptions?.validate(name: "\(name).cloudWatchLoggingOptions")
            try self.encryptionConfiguration?.validate(name: "\(name).encryptionConfiguration")
            try self.validate(self.errorOutputPrefix, name: "errorOutputPrefix", parent: name, max: 1024)
            try self.validate(self.errorOutputPrefix, name: "errorOutputPrefix", parent: name, pattern: ".*")
            try self.validate(self.prefix, name: "prefix", parent: name, max: 1024)
            try self.validate(self.prefix, name: "prefix", parent: name, pattern: ".*")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 512)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "^arn:")
        }

        private enum CodingKeys: String, CodingKey {
            case bucketARN = "BucketARN"
            case bufferingHints = "BufferingHints"
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case compressionFormat = "CompressionFormat"
            case encryptionConfiguration = "EncryptionConfiguration"
            case errorOutputPrefix = "ErrorOutputPrefix"
            case prefix = "Prefix"
            case roleARN = "RoleARN"
        }
    }

    public struct SchemaConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// The ID of the Amazon Web Services Glue Data Catalog. If you don't supply this, the Amazon Web Services account ID is used by default.
        public let catalogId: String?
        /// Specifies the name of the Amazon Web Services Glue database that contains the schema for the output data.  If the SchemaConfiguration request parameter is used as part of invoking the CreateDeliveryStream API, then the DatabaseName property is required and its value must be specified.
        public let databaseName: String?
        /// If you don't specify an Amazon Web Services Region, the default is the current Region.
        public let region: String?
        /// The role that Kinesis Data Firehose can use to access Amazon Web Services Glue. This role must be in the same account you use for Kinesis Data Firehose. Cross-account roles aren't allowed.  If the SchemaConfiguration request parameter is used as part of invoking the CreateDeliveryStream API, then the RoleARN property is required and its value must be specified.
        public let roleARN: String?
        /// Specifies the Amazon Web Services Glue table that contains the column information that constitutes your data schema.  If the SchemaConfiguration request parameter is used as part of invoking the CreateDeliveryStream API, then the TableName property is required and its value must be specified.
        public let tableName: String?
        /// Specifies the table version for the output data schema. If you don't specify this version ID, or if you set it to LATEST, Kinesis Data Firehose uses the most recent version. This means that any updates to the table are automatically picked up.
        public let versionId: String?

        public init(catalogId: String? = nil, databaseName: String? = nil, region: String? = nil, roleARN: String? = nil, tableName: String? = nil, versionId: String? = nil) {
            self.catalogId = catalogId
            self.databaseName = databaseName
            self.region = region
            self.roleARN = roleARN
            self.tableName = tableName
            self.versionId = versionId
        }

        public func validate(name: String) throws {
            try self.validate(self.catalogId, name: "catalogId", parent: name, max: 1024)
            try self.validate(self.catalogId, name: "catalogId", parent: name, min: 1)
            try self.validate(self.catalogId, name: "catalogId", parent: name, pattern: "^\\S+$")
            try self.validate(self.databaseName, name: "databaseName", parent: name, max: 1024)
            try self.validate(self.databaseName, name: "databaseName", parent: name, min: 1)
            try self.validate(self.databaseName, name: "databaseName", parent: name, pattern: "^\\S+$")
            try self.validate(self.region, name: "region", parent: name, max: 1024)
            try self.validate(self.region, name: "region", parent: name, min: 1)
            try self.validate(self.region, name: "region", parent: name, pattern: "^\\S+$")
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 1024)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "^\\S+$")
            try self.validate(self.tableName, name: "tableName", parent: name, max: 1024)
            try self.validate(self.tableName, name: "tableName", parent: name, min: 1)
            try self.validate(self.tableName, name: "tableName", parent: name, pattern: "^\\S+$")
            try self.validate(self.versionId, name: "versionId", parent: name, max: 1024)
            try self.validate(self.versionId, name: "versionId", parent: name, min: 1)
            try self.validate(self.versionId, name: "versionId", parent: name, pattern: "^\\S+$")
        }

        private enum CodingKeys: String, CodingKey {
            case catalogId = "CatalogId"
            case databaseName = "DatabaseName"
            case region = "Region"
            case roleARN = "RoleARN"
            case tableName = "TableName"
            case versionId = "VersionId"
        }
    }

    public struct Serializer: AWSEncodableShape & AWSDecodableShape {
        /// A serializer to use for converting data to the ORC format before storing it in Amazon S3. For more information, see Apache ORC.
        public let orcSerDe: OrcSerDe?
        /// A serializer to use for converting data to the Parquet format before storing it in Amazon S3. For more information, see Apache Parquet.
        public let parquetSerDe: ParquetSerDe?

        public init(orcSerDe: OrcSerDe? = nil, parquetSerDe: ParquetSerDe? = nil) {
            self.orcSerDe = orcSerDe
            self.parquetSerDe = parquetSerDe
        }

        public func validate(name: String) throws {
            try self.orcSerDe?.validate(name: "\(name).orcSerDe")
            try self.parquetSerDe?.validate(name: "\(name).parquetSerDe")
        }

        private enum CodingKeys: String, CodingKey {
            case orcSerDe = "OrcSerDe"
            case parquetSerDe = "ParquetSerDe"
        }
    }

    public struct SourceDescription: AWSDecodableShape {
        /// The KinesisStreamSourceDescription value for the source Kinesis data stream.
        public let kinesisStreamSourceDescription: KinesisStreamSourceDescription?

        public init(kinesisStreamSourceDescription: KinesisStreamSourceDescription? = nil) {
            self.kinesisStreamSourceDescription = kinesisStreamSourceDescription
        }

        private enum CodingKeys: String, CodingKey {
            case kinesisStreamSourceDescription = "KinesisStreamSourceDescription"
        }
    }

    public struct SplunkDestinationConfiguration: AWSEncodableShape {
        /// The Amazon CloudWatch logging options for your delivery stream.
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// The amount of time that Kinesis Data Firehose waits to receive an acknowledgment from Splunk after it sends it data. At the end of the timeout period, Kinesis Data Firehose either tries to send the data again or considers it an error, based on your retry settings.
        public let hecAcknowledgmentTimeoutInSeconds: Int?
        /// The HTTP Event Collector (HEC) endpoint to which Kinesis Data Firehose sends your data.
        public let hecEndpoint: String
        /// This type can be either "Raw" or "Event."
        public let hecEndpointType: HECEndpointType
        /// This is a GUID that you obtain from your Splunk cluster when you create a new HEC endpoint.
        public let hecToken: String
        /// The data processing configuration.
        public let processingConfiguration: ProcessingConfiguration?
        /// The retry behavior in case Kinesis Data Firehose is unable to deliver data to Splunk, or if it doesn't receive an acknowledgment of receipt from Splunk.
        public let retryOptions: SplunkRetryOptions?
        /// Defines how documents should be delivered to Amazon S3. When set to FailedEventsOnly, Kinesis Data Firehose writes any data that could not be indexed to the configured Amazon S3 destination. When set to AllEvents, Kinesis Data Firehose delivers all incoming records to Amazon S3, and also writes failed documents to Amazon S3. The default value is FailedEventsOnly. You can update this backup mode from FailedEventsOnly to AllEvents. You can't update it from AllEvents to FailedEventsOnly.
        public let s3BackupMode: SplunkS3BackupMode?
        /// The configuration for the backup Amazon S3 location.
        public let s3Configuration: S3DestinationConfiguration

        public init(cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, hecAcknowledgmentTimeoutInSeconds: Int? = nil, hecEndpoint: String, hecEndpointType: HECEndpointType, hecToken: String, processingConfiguration: ProcessingConfiguration? = nil, retryOptions: SplunkRetryOptions? = nil, s3BackupMode: SplunkS3BackupMode? = nil, s3Configuration: S3DestinationConfiguration) {
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.hecAcknowledgmentTimeoutInSeconds = hecAcknowledgmentTimeoutInSeconds
            self.hecEndpoint = hecEndpoint
            self.hecEndpointType = hecEndpointType
            self.hecToken = hecToken
            self.processingConfiguration = processingConfiguration
            self.retryOptions = retryOptions
            self.s3BackupMode = s3BackupMode
            self.s3Configuration = s3Configuration
        }

        public func validate(name: String) throws {
            try self.cloudWatchLoggingOptions?.validate(name: "\(name).cloudWatchLoggingOptions")
            try self.validate(self.hecAcknowledgmentTimeoutInSeconds, name: "hecAcknowledgmentTimeoutInSeconds", parent: name, max: 600)
            try self.validate(self.hecAcknowledgmentTimeoutInSeconds, name: "hecAcknowledgmentTimeoutInSeconds", parent: name, min: 180)
            try self.validate(self.hecEndpoint, name: "hecEndpoint", parent: name, max: 2048)
            try self.validate(self.hecEndpoint, name: "hecEndpoint", parent: name, pattern: ".*")
            try self.validate(self.hecToken, name: "hecToken", parent: name, max: 2048)
            try self.validate(self.hecToken, name: "hecToken", parent: name, pattern: ".*")
            try self.processingConfiguration?.validate(name: "\(name).processingConfiguration")
            try self.retryOptions?.validate(name: "\(name).retryOptions")
            try self.s3Configuration.validate(name: "\(name).s3Configuration")
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case hecAcknowledgmentTimeoutInSeconds = "HECAcknowledgmentTimeoutInSeconds"
            case hecEndpoint = "HECEndpoint"
            case hecEndpointType = "HECEndpointType"
            case hecToken = "HECToken"
            case processingConfiguration = "ProcessingConfiguration"
            case retryOptions = "RetryOptions"
            case s3BackupMode = "S3BackupMode"
            case s3Configuration = "S3Configuration"
        }
    }

    public struct SplunkDestinationDescription: AWSDecodableShape {
        /// The Amazon CloudWatch logging options for your delivery stream.
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// The amount of time that Kinesis Data Firehose waits to receive an acknowledgment from Splunk after it sends it data. At the end of the timeout period, Kinesis Data Firehose either tries to send the data again or considers it an error, based on your retry settings.
        public let hecAcknowledgmentTimeoutInSeconds: Int?
        /// The HTTP Event Collector (HEC) endpoint to which Kinesis Data Firehose sends your data.
        public let hecEndpoint: String?
        /// This type can be either "Raw" or "Event."
        public let hecEndpointType: HECEndpointType?
        /// A GUID you obtain from your Splunk cluster when you create a new HEC endpoint.
        public let hecToken: String?
        /// The data processing configuration.
        public let processingConfiguration: ProcessingConfiguration?
        /// The retry behavior in case Kinesis Data Firehose is unable to deliver data to Splunk or if it doesn't receive an acknowledgment of receipt from Splunk.
        public let retryOptions: SplunkRetryOptions?
        /// Defines how documents should be delivered to Amazon S3. When set to FailedDocumentsOnly, Kinesis Data Firehose writes any data that could not be indexed to the configured Amazon S3 destination. When set to AllDocuments, Kinesis Data Firehose delivers all incoming records to Amazon S3, and also writes failed documents to Amazon S3. Default value is FailedDocumentsOnly.
        public let s3BackupMode: SplunkS3BackupMode?
        /// The Amazon S3 destination.>
        public let s3DestinationDescription: S3DestinationDescription?

        public init(cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, hecAcknowledgmentTimeoutInSeconds: Int? = nil, hecEndpoint: String? = nil, hecEndpointType: HECEndpointType? = nil, hecToken: String? = nil, processingConfiguration: ProcessingConfiguration? = nil, retryOptions: SplunkRetryOptions? = nil, s3BackupMode: SplunkS3BackupMode? = nil, s3DestinationDescription: S3DestinationDescription? = nil) {
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.hecAcknowledgmentTimeoutInSeconds = hecAcknowledgmentTimeoutInSeconds
            self.hecEndpoint = hecEndpoint
            self.hecEndpointType = hecEndpointType
            self.hecToken = hecToken
            self.processingConfiguration = processingConfiguration
            self.retryOptions = retryOptions
            self.s3BackupMode = s3BackupMode
            self.s3DestinationDescription = s3DestinationDescription
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case hecAcknowledgmentTimeoutInSeconds = "HECAcknowledgmentTimeoutInSeconds"
            case hecEndpoint = "HECEndpoint"
            case hecEndpointType = "HECEndpointType"
            case hecToken = "HECToken"
            case processingConfiguration = "ProcessingConfiguration"
            case retryOptions = "RetryOptions"
            case s3BackupMode = "S3BackupMode"
            case s3DestinationDescription = "S3DestinationDescription"
        }
    }

    public struct SplunkDestinationUpdate: AWSEncodableShape {
        /// The Amazon CloudWatch logging options for your delivery stream.
        public let cloudWatchLoggingOptions: CloudWatchLoggingOptions?
        /// The amount of time that Kinesis Data Firehose waits to receive an acknowledgment from Splunk after it sends data. At the end of the timeout period, Kinesis Data Firehose either tries to send the data again or considers it an error, based on your retry settings.
        public let hecAcknowledgmentTimeoutInSeconds: Int?
        /// The HTTP Event Collector (HEC) endpoint to which Kinesis Data Firehose sends your data.
        public let hecEndpoint: String?
        /// This type can be either "Raw" or "Event."
        public let hecEndpointType: HECEndpointType?
        /// A GUID that you obtain from your Splunk cluster when you create a new HEC endpoint.
        public let hecToken: String?
        /// The data processing configuration.
        public let processingConfiguration: ProcessingConfiguration?
        /// The retry behavior in case Kinesis Data Firehose is unable to deliver data to Splunk or if it doesn't receive an acknowledgment of receipt from Splunk.
        public let retryOptions: SplunkRetryOptions?
        /// Specifies how you want Kinesis Data Firehose to back up documents to Amazon S3. When set to FailedDocumentsOnly, Kinesis Data Firehose writes any data that could not be indexed to the configured Amazon S3 destination. When set to AllEvents, Kinesis Data Firehose delivers all incoming records to Amazon S3, and also writes failed documents to Amazon S3. The default value is FailedEventsOnly. You can update this backup mode from FailedEventsOnly to AllEvents. You can't update it from AllEvents to FailedEventsOnly.
        public let s3BackupMode: SplunkS3BackupMode?
        /// Your update to the configuration of the backup Amazon S3 location.
        public let s3Update: S3DestinationUpdate?

        public init(cloudWatchLoggingOptions: CloudWatchLoggingOptions? = nil, hecAcknowledgmentTimeoutInSeconds: Int? = nil, hecEndpoint: String? = nil, hecEndpointType: HECEndpointType? = nil, hecToken: String? = nil, processingConfiguration: ProcessingConfiguration? = nil, retryOptions: SplunkRetryOptions? = nil, s3BackupMode: SplunkS3BackupMode? = nil, s3Update: S3DestinationUpdate? = nil) {
            self.cloudWatchLoggingOptions = cloudWatchLoggingOptions
            self.hecAcknowledgmentTimeoutInSeconds = hecAcknowledgmentTimeoutInSeconds
            self.hecEndpoint = hecEndpoint
            self.hecEndpointType = hecEndpointType
            self.hecToken = hecToken
            self.processingConfiguration = processingConfiguration
            self.retryOptions = retryOptions
            self.s3BackupMode = s3BackupMode
            self.s3Update = s3Update
        }

        public func validate(name: String) throws {
            try self.cloudWatchLoggingOptions?.validate(name: "\(name).cloudWatchLoggingOptions")
            try self.validate(self.hecAcknowledgmentTimeoutInSeconds, name: "hecAcknowledgmentTimeoutInSeconds", parent: name, max: 600)
            try self.validate(self.hecAcknowledgmentTimeoutInSeconds, name: "hecAcknowledgmentTimeoutInSeconds", parent: name, min: 180)
            try self.validate(self.hecEndpoint, name: "hecEndpoint", parent: name, max: 2048)
            try self.validate(self.hecEndpoint, name: "hecEndpoint", parent: name, pattern: ".*")
            try self.validate(self.hecToken, name: "hecToken", parent: name, max: 2048)
            try self.validate(self.hecToken, name: "hecToken", parent: name, pattern: ".*")
            try self.processingConfiguration?.validate(name: "\(name).processingConfiguration")
            try self.retryOptions?.validate(name: "\(name).retryOptions")
            try self.s3Update?.validate(name: "\(name).s3Update")
        }

        private enum CodingKeys: String, CodingKey {
            case cloudWatchLoggingOptions = "CloudWatchLoggingOptions"
            case hecAcknowledgmentTimeoutInSeconds = "HECAcknowledgmentTimeoutInSeconds"
            case hecEndpoint = "HECEndpoint"
            case hecEndpointType = "HECEndpointType"
            case hecToken = "HECToken"
            case processingConfiguration = "ProcessingConfiguration"
            case retryOptions = "RetryOptions"
            case s3BackupMode = "S3BackupMode"
            case s3Update = "S3Update"
        }
    }

    public struct SplunkRetryOptions: AWSEncodableShape & AWSDecodableShape {
        /// The total amount of time that Kinesis Data Firehose spends on retries. This duration starts after the initial attempt to send data to Splunk fails. It doesn't include the periods during which Kinesis Data Firehose waits for acknowledgment from Splunk after each attempt.
        public let durationInSeconds: Int?

        public init(durationInSeconds: Int? = nil) {
            self.durationInSeconds = durationInSeconds
        }

        public func validate(name: String) throws {
            try self.validate(self.durationInSeconds, name: "durationInSeconds", parent: name, max: 7200)
            try self.validate(self.durationInSeconds, name: "durationInSeconds", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case durationInSeconds = "DurationInSeconds"
        }
    }

    public struct StartDeliveryStreamEncryptionInput: AWSEncodableShape {
        /// Used to specify the type and Amazon Resource Name (ARN) of the KMS key needed for Server-Side Encryption (SSE).
        public let deliveryStreamEncryptionConfigurationInput: DeliveryStreamEncryptionConfigurationInput?
        /// The name of the delivery stream for which you want to enable server-side encryption (SSE).
        public let deliveryStreamName: String

        public init(deliveryStreamEncryptionConfigurationInput: DeliveryStreamEncryptionConfigurationInput? = nil, deliveryStreamName: String) {
            self.deliveryStreamEncryptionConfigurationInput = deliveryStreamEncryptionConfigurationInput
            self.deliveryStreamName = deliveryStreamName
        }

        public func validate(name: String) throws {
            try self.deliveryStreamEncryptionConfigurationInput?.validate(name: "\(name).deliveryStreamEncryptionConfigurationInput")
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, max: 64)
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, min: 1)
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, pattern: "^[a-zA-Z0-9_.-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case deliveryStreamEncryptionConfigurationInput = "DeliveryStreamEncryptionConfigurationInput"
            case deliveryStreamName = "DeliveryStreamName"
        }
    }

    public struct StartDeliveryStreamEncryptionOutput: AWSDecodableShape {
        public init() {}
    }

    public struct StopDeliveryStreamEncryptionInput: AWSEncodableShape {
        /// The name of the delivery stream for which you want to disable server-side encryption (SSE).
        public let deliveryStreamName: String

        public init(deliveryStreamName: String) {
            self.deliveryStreamName = deliveryStreamName
        }

        public func validate(name: String) throws {
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, max: 64)
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, min: 1)
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, pattern: "^[a-zA-Z0-9_.-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case deliveryStreamName = "DeliveryStreamName"
        }
    }

    public struct StopDeliveryStreamEncryptionOutput: AWSDecodableShape {
        public init() {}
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// A unique identifier for the tag. Maximum length: 128 characters. Valid characters: Unicode letters, digits, white space, _ . / = + - % @
        public let key: String
        /// An optional string, which you can use to describe or define the tag. Maximum length: 256 characters. Valid characters: Unicode letters, digits, white space, _ . / = + - % @
        public let value: String?

        public init(key: String, value: String? = nil) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, pattern: "^(?!aws:)[\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@%]*$")
            try self.validate(self.value, name: "value", parent: name, max: 256)
            try self.validate(self.value, name: "value", parent: name, pattern: "^[\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@%]*$")
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TagDeliveryStreamInput: AWSEncodableShape {
        /// The name of the delivery stream to which you want to add the tags.
        public let deliveryStreamName: String
        /// A set of key-value pairs to use to create the tags.
        public let tags: [Tag]

        public init(deliveryStreamName: String, tags: [Tag]) {
            self.deliveryStreamName = deliveryStreamName
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, max: 64)
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, min: 1)
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, pattern: "^[a-zA-Z0-9_.-]+$")
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tags, name: "tags", parent: name, max: 50)
            try self.validate(self.tags, name: "tags", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case deliveryStreamName = "DeliveryStreamName"
            case tags = "Tags"
        }
    }

    public struct TagDeliveryStreamOutput: AWSDecodableShape {
        public init() {}
    }

    public struct UntagDeliveryStreamInput: AWSEncodableShape {
        /// The name of the delivery stream.
        public let deliveryStreamName: String
        /// A list of tag keys. Each corresponding tag is removed from the delivery stream.
        public let tagKeys: [String]

        public init(deliveryStreamName: String, tagKeys: [String]) {
            self.deliveryStreamName = deliveryStreamName
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, max: 64)
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, min: 1)
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, pattern: "^[a-zA-Z0-9_.-]+$")
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "^(?!aws:)[\\p{L}\\p{Z}\\p{N}_.:\\/=+\\-@%]*$")
            }
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, max: 50)
            try self.validate(self.tagKeys, name: "tagKeys", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case deliveryStreamName = "DeliveryStreamName"
            case tagKeys = "TagKeys"
        }
    }

    public struct UntagDeliveryStreamOutput: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateDestinationInput: AWSEncodableShape {
        /// Describes an update for a destination in the Serverless offering for Amazon OpenSearch Service.
        public let amazonOpenSearchServerlessDestinationUpdate: AmazonOpenSearchServerlessDestinationUpdate?
        /// Describes an update for a destination in Amazon OpenSearch Service.
        public let amazonopensearchserviceDestinationUpdate: AmazonopensearchserviceDestinationUpdate?
        /// Obtain this value from the VersionId result of DeliveryStreamDescription. This value is required, and helps the service perform conditional operations. For example, if there is an interleaving update and this value is null, then the update destination fails. After the update is successful, the VersionId value is updated. The service then performs a merge of the old configuration with the new configuration.
        public let currentDeliveryStreamVersionId: String
        /// The name of the delivery stream.
        public let deliveryStreamName: String
        /// The ID of the destination.
        public let destinationId: String
        /// Describes an update for a destination in Amazon ES.
        public let elasticsearchDestinationUpdate: ElasticsearchDestinationUpdate?
        /// Describes an update for a destination in Amazon S3.
        public let extendedS3DestinationUpdate: ExtendedS3DestinationUpdate?
        /// Describes an update to the specified HTTP endpoint destination.
        public let httpEndpointDestinationUpdate: HttpEndpointDestinationUpdate?
        /// Describes an update for a destination in Amazon Redshift.
        public let redshiftDestinationUpdate: RedshiftDestinationUpdate?
        /// [Deprecated] Describes an update for a destination in Amazon S3.
        public let s3DestinationUpdate: S3DestinationUpdate?
        /// Describes an update for a destination in Splunk.
        public let splunkDestinationUpdate: SplunkDestinationUpdate?

        public init(amazonOpenSearchServerlessDestinationUpdate: AmazonOpenSearchServerlessDestinationUpdate? = nil, amazonopensearchserviceDestinationUpdate: AmazonopensearchserviceDestinationUpdate? = nil, currentDeliveryStreamVersionId: String, deliveryStreamName: String, destinationId: String, elasticsearchDestinationUpdate: ElasticsearchDestinationUpdate? = nil, extendedS3DestinationUpdate: ExtendedS3DestinationUpdate? = nil, httpEndpointDestinationUpdate: HttpEndpointDestinationUpdate? = nil, redshiftDestinationUpdate: RedshiftDestinationUpdate? = nil, splunkDestinationUpdate: SplunkDestinationUpdate? = nil) {
            self.amazonOpenSearchServerlessDestinationUpdate = amazonOpenSearchServerlessDestinationUpdate
            self.amazonopensearchserviceDestinationUpdate = amazonopensearchserviceDestinationUpdate
            self.currentDeliveryStreamVersionId = currentDeliveryStreamVersionId
            self.deliveryStreamName = deliveryStreamName
            self.destinationId = destinationId
            self.elasticsearchDestinationUpdate = elasticsearchDestinationUpdate
            self.extendedS3DestinationUpdate = extendedS3DestinationUpdate
            self.httpEndpointDestinationUpdate = httpEndpointDestinationUpdate
            self.redshiftDestinationUpdate = redshiftDestinationUpdate
            self.s3DestinationUpdate = nil
            self.splunkDestinationUpdate = splunkDestinationUpdate
        }

        @available(*, deprecated, message: "Members s3DestinationUpdate have been deprecated")
        public init(amazonOpenSearchServerlessDestinationUpdate: AmazonOpenSearchServerlessDestinationUpdate? = nil, amazonopensearchserviceDestinationUpdate: AmazonopensearchserviceDestinationUpdate? = nil, currentDeliveryStreamVersionId: String, deliveryStreamName: String, destinationId: String, elasticsearchDestinationUpdate: ElasticsearchDestinationUpdate? = nil, extendedS3DestinationUpdate: ExtendedS3DestinationUpdate? = nil, httpEndpointDestinationUpdate: HttpEndpointDestinationUpdate? = nil, redshiftDestinationUpdate: RedshiftDestinationUpdate? = nil, s3DestinationUpdate: S3DestinationUpdate? = nil, splunkDestinationUpdate: SplunkDestinationUpdate? = nil) {
            self.amazonOpenSearchServerlessDestinationUpdate = amazonOpenSearchServerlessDestinationUpdate
            self.amazonopensearchserviceDestinationUpdate = amazonopensearchserviceDestinationUpdate
            self.currentDeliveryStreamVersionId = currentDeliveryStreamVersionId
            self.deliveryStreamName = deliveryStreamName
            self.destinationId = destinationId
            self.elasticsearchDestinationUpdate = elasticsearchDestinationUpdate
            self.extendedS3DestinationUpdate = extendedS3DestinationUpdate
            self.httpEndpointDestinationUpdate = httpEndpointDestinationUpdate
            self.redshiftDestinationUpdate = redshiftDestinationUpdate
            self.s3DestinationUpdate = s3DestinationUpdate
            self.splunkDestinationUpdate = splunkDestinationUpdate
        }

        public func validate(name: String) throws {
            try self.amazonOpenSearchServerlessDestinationUpdate?.validate(name: "\(name).amazonOpenSearchServerlessDestinationUpdate")
            try self.amazonopensearchserviceDestinationUpdate?.validate(name: "\(name).amazonopensearchserviceDestinationUpdate")
            try self.validate(self.currentDeliveryStreamVersionId, name: "currentDeliveryStreamVersionId", parent: name, max: 50)
            try self.validate(self.currentDeliveryStreamVersionId, name: "currentDeliveryStreamVersionId", parent: name, min: 1)
            try self.validate(self.currentDeliveryStreamVersionId, name: "currentDeliveryStreamVersionId", parent: name, pattern: "^[0-9]+$")
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, max: 64)
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, min: 1)
            try self.validate(self.deliveryStreamName, name: "deliveryStreamName", parent: name, pattern: "^[a-zA-Z0-9_.-]+$")
            try self.validate(self.destinationId, name: "destinationId", parent: name, max: 100)
            try self.validate(self.destinationId, name: "destinationId", parent: name, min: 1)
            try self.validate(self.destinationId, name: "destinationId", parent: name, pattern: "^[a-zA-Z0-9-]+$")
            try self.elasticsearchDestinationUpdate?.validate(name: "\(name).elasticsearchDestinationUpdate")
            try self.extendedS3DestinationUpdate?.validate(name: "\(name).extendedS3DestinationUpdate")
            try self.httpEndpointDestinationUpdate?.validate(name: "\(name).httpEndpointDestinationUpdate")
            try self.redshiftDestinationUpdate?.validate(name: "\(name).redshiftDestinationUpdate")
            try self.s3DestinationUpdate?.validate(name: "\(name).s3DestinationUpdate")
            try self.splunkDestinationUpdate?.validate(name: "\(name).splunkDestinationUpdate")
        }

        private enum CodingKeys: String, CodingKey {
            case amazonOpenSearchServerlessDestinationUpdate = "AmazonOpenSearchServerlessDestinationUpdate"
            case amazonopensearchserviceDestinationUpdate = "AmazonopensearchserviceDestinationUpdate"
            case currentDeliveryStreamVersionId = "CurrentDeliveryStreamVersionId"
            case deliveryStreamName = "DeliveryStreamName"
            case destinationId = "DestinationId"
            case elasticsearchDestinationUpdate = "ElasticsearchDestinationUpdate"
            case extendedS3DestinationUpdate = "ExtendedS3DestinationUpdate"
            case httpEndpointDestinationUpdate = "HttpEndpointDestinationUpdate"
            case redshiftDestinationUpdate = "RedshiftDestinationUpdate"
            case s3DestinationUpdate = "S3DestinationUpdate"
            case splunkDestinationUpdate = "SplunkDestinationUpdate"
        }
    }

    public struct UpdateDestinationOutput: AWSDecodableShape {
        public init() {}
    }

    public struct VpcConfiguration: AWSEncodableShape {
        /// The ARN of the IAM role that you want the delivery stream to use to create endpoints in the destination VPC. You can use your existing Kinesis Data Firehose delivery role or you can specify a new role. In either case, make sure that the role trusts the Kinesis Data Firehose service principal and that it grants the following permissions:    ec2:DescribeVpcs     ec2:DescribeVpcAttribute     ec2:DescribeSubnets     ec2:DescribeSecurityGroups     ec2:DescribeNetworkInterfaces     ec2:CreateNetworkInterface     ec2:CreateNetworkInterfacePermission     ec2:DeleteNetworkInterface    If you revoke these permissions after you create the delivery stream, Kinesis Data Firehose can't scale out by creating more ENIs when necessary. You might therefore see a degradation in performance.
        public let roleARN: String
        /// The IDs of the security groups that you want Kinesis Data Firehose to use when it creates ENIs in the VPC of the Amazon ES destination. You can use the same security group that the Amazon ES domain uses or different ones. If you specify different security groups here, ensure that they allow outbound HTTPS traffic to the Amazon ES domain's security group. Also ensure that the Amazon ES domain's security group allows HTTPS traffic from the security groups specified here. If you use the same security group for both your delivery stream and the Amazon ES domain, make sure the security group inbound rule allows HTTPS traffic. For more information about security group rules, see Security group rules in the Amazon VPC documentation.
        public let securityGroupIds: [String]
        /// The IDs of the subnets that you want Kinesis Data Firehose to use to create ENIs in the VPC of the Amazon ES destination. Make sure that the routing tables and inbound and outbound rules allow traffic to flow from the subnets whose IDs are specified here to the subnets that have the destination Amazon ES endpoints. Kinesis Data Firehose creates at least one ENI in each of the subnets that are specified here. Do not delete or modify these ENIs. The number of ENIs that Kinesis Data Firehose creates in the subnets specified here scales up and down automatically based on throughput. To enable Kinesis Data Firehose to scale up the number of ENIs to match throughput, ensure that you have sufficient quota. To help you calculate the quota you need, assume that Kinesis Data Firehose can create up to three ENIs for this delivery stream for each of the subnets specified here. For more information about ENI quota, see Network Interfaces in the Amazon VPC Quotas topic.
        public let subnetIds: [String]

        public init(roleARN: String, securityGroupIds: [String], subnetIds: [String]) {
            self.roleARN = roleARN
            self.securityGroupIds = securityGroupIds
            self.subnetIds = subnetIds
        }

        public func validate(name: String) throws {
            try self.validate(self.roleARN, name: "roleARN", parent: name, max: 512)
            try self.validate(self.roleARN, name: "roleARN", parent: name, min: 1)
            try self.validate(self.roleARN, name: "roleARN", parent: name, pattern: "^arn:")
            try self.securityGroupIds.forEach {
                try validate($0, name: "securityGroupIds[]", parent: name, max: 1024)
                try validate($0, name: "securityGroupIds[]", parent: name, min: 1)
                try validate($0, name: "securityGroupIds[]", parent: name, pattern: "^\\S+$")
            }
            try self.validate(self.securityGroupIds, name: "securityGroupIds", parent: name, max: 5)
            try self.validate(self.securityGroupIds, name: "securityGroupIds", parent: name, min: 1)
            try self.subnetIds.forEach {
                try validate($0, name: "subnetIds[]", parent: name, max: 1024)
                try validate($0, name: "subnetIds[]", parent: name, min: 1)
                try validate($0, name: "subnetIds[]", parent: name, pattern: "^\\S+$")
            }
            try self.validate(self.subnetIds, name: "subnetIds", parent: name, max: 16)
            try self.validate(self.subnetIds, name: "subnetIds", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case roleARN = "RoleARN"
            case securityGroupIds = "SecurityGroupIds"
            case subnetIds = "SubnetIds"
        }
    }

    public struct VpcConfigurationDescription: AWSDecodableShape {
        /// The ARN of the IAM role that the delivery stream uses to create endpoints in the destination VPC. You can use your existing Kinesis Data Firehose delivery role or you can specify a new role. In either case, make sure that the role trusts the Kinesis Data Firehose service principal and that it grants the following permissions:    ec2:DescribeVpcs     ec2:DescribeVpcAttribute     ec2:DescribeSubnets     ec2:DescribeSecurityGroups     ec2:DescribeNetworkInterfaces     ec2:CreateNetworkInterface     ec2:CreateNetworkInterfacePermission     ec2:DeleteNetworkInterface    If you revoke these permissions after you create the delivery stream, Kinesis Data Firehose can't scale out by creating more ENIs when necessary. You might therefore see a degradation in performance.
        public let roleARN: String
        /// The IDs of the security groups that Kinesis Data Firehose uses when it creates ENIs in the VPC of the Amazon ES destination. You can use the same security group that the Amazon ES domain uses or different ones. If you specify different security groups, ensure that they allow outbound HTTPS traffic to the Amazon ES domain's security group. Also ensure that the Amazon ES domain's security group allows HTTPS traffic from the security groups specified here. If you use the same security group for both your delivery stream and the Amazon ES domain, make sure the security group inbound rule allows HTTPS traffic. For more information about security group rules, see Security group rules in the Amazon VPC documentation.
        public let securityGroupIds: [String]
        /// The IDs of the subnets that Kinesis Data Firehose uses to create ENIs in the VPC of the Amazon ES destination. Make sure that the routing tables and inbound and outbound rules allow traffic to flow from the subnets whose IDs are specified here to the subnets that have the destination Amazon ES endpoints. Kinesis Data Firehose creates at least one ENI in each of the subnets that are specified here. Do not delete or modify these ENIs. The number of ENIs that Kinesis Data Firehose creates in the subnets specified here scales up and down automatically based on throughput. To enable Kinesis Data Firehose to scale up the number of ENIs to match throughput, ensure that you have sufficient quota. To help you calculate the quota you need, assume that Kinesis Data Firehose can create up to three ENIs for this delivery stream for each of the subnets specified here. For more information about ENI quota, see Network Interfaces in the Amazon VPC Quotas topic.
        public let subnetIds: [String]
        /// The ID of the Amazon ES destination's VPC.
        public let vpcId: String

        public init(roleARN: String, securityGroupIds: [String], subnetIds: [String], vpcId: String) {
            self.roleARN = roleARN
            self.securityGroupIds = securityGroupIds
            self.subnetIds = subnetIds
            self.vpcId = vpcId
        }

        private enum CodingKeys: String, CodingKey {
            case roleARN = "RoleARN"
            case securityGroupIds = "SecurityGroupIds"
            case subnetIds = "SubnetIds"
            case vpcId = "VpcId"
        }
    }
}

// MARK: - Errors

/// Error enum for Firehose
public struct FirehoseErrorType: AWSErrorType {
    enum Code: String {
        case concurrentModificationException = "ConcurrentModificationException"
        case invalidArgumentException = "InvalidArgumentException"
        case invalidKMSResourceException = "InvalidKMSResourceException"
        case limitExceededException = "LimitExceededException"
        case resourceInUseException = "ResourceInUseException"
        case resourceNotFoundException = "ResourceNotFoundException"
        case serviceUnavailableException = "ServiceUnavailableException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize Firehose
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// Another modification has already happened. Fetch VersionId again and use it to update the destination.
    public static var concurrentModificationException: Self { .init(.concurrentModificationException) }
    /// The specified input parameter has a value that is not valid.
    public static var invalidArgumentException: Self { .init(.invalidArgumentException) }
    /// Kinesis Data Firehose throws this exception when an attempt to put records or to start or stop delivery stream encryption fails. This happens when the KMS service throws one of the following exception types: AccessDeniedException, InvalidStateException, DisabledException, or NotFoundException.
    public static var invalidKMSResourceException: Self { .init(.invalidKMSResourceException) }
    /// You have already reached the limit for a requested resource.
    public static var limitExceededException: Self { .init(.limitExceededException) }
    /// The resource is already in use and not available for this operation.
    public static var resourceInUseException: Self { .init(.resourceInUseException) }
    /// The specified resource could not be found.
    public static var resourceNotFoundException: Self { .init(.resourceNotFoundException) }
    /// The service is unavailable. Back off and retry the operation. If you continue to see the exception, throughput limits for the delivery stream may have been exceeded. For more information about limits and how to request an increase, see Amazon Kinesis Data Firehose Limits.
    public static var serviceUnavailableException: Self { .init(.serviceUnavailableException) }
}

extension FirehoseErrorType: Equatable {
    public static func == (lhs: FirehoseErrorType, rhs: FirehoseErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension FirehoseErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
